write_to_tsfile#

write_to_tsfile(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.

Note that this file is structured to still support the

Parameters:
Xnp.ndarray (n_cases, n_channels, n_timepoints) or list of np.ndarray[
n_cases] or pd.DataFrame with (n_cases,n_channels), each cell a pd.Series

Collection of time series: univariate, multivariate, equal or unequal length.

pathstring.

Location of the directory to write file

y: None or 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