write_to_ts_file

write_to_ts_file(X, path, y=None, problem_name='sample_data.ts', header=None, regression=False)[source]

Write an aeon collection of time series to text file in .ts format.

Write metadata and data stored in aeon compatible data set to file. A description of the ts format is in examples/load_data.ipynb.

Parameters:
XUnion[list, np.ndarray]

Collection of time series, either equal length shape (n_cases, n_channels, n_timepoints) or unequal length as a list of np.ndarray, each of shape (n_channels,n_timepoints_i).

pathstring

Location of the directory to write file

y: None or np.ndarray, default = None

Response variable, discrete for classification, continuous for regression None if clustering.

problem_namestring, default = “sample_data”

The file is written to <path>/<problem_name>/<problem_name>.ts

header: string, default = None

Optional text at the top of the file that is ignored when loading.

regression: boolean, default = False

Indicate if this is a regression problem, so it is correcty specified in the header since there is no definite way of inferring this from y