load_from_tsfile

load_from_tsfile(full_file_path_and_name, replace_missing_vals_with='NaN', return_meta_data=False, return_type='auto')[source]

Load time series .ts file into X and (optionally) y.

Parameters:
full_file_path_and_namestring

full path of the file to load, .ts extension is assumed.

replace_missing_vals_withstring, default=”NaN”

issing values in the file are replaces with this value

return_meta_databoolean, default=False

return a dictionary with the meta data loaded from the file

return_typestring, default = “auto”

data type to convert to. If “auto”, returns numpy3D for equal length and list of numpy2D for unequal. If “numpy2D”, will squash a univariate equal length into a numpy2D (n_cases, n_timepoints). Other options are available but not supported medium term.

Returns:
data: Union[np.ndarray,list]

time series data, np.ndarray (n_cases, n_channels, n_timepoints) if equal length time series, list of [n_cases] np.ndarray (n_channels, n_timepoints) if unequal length series.

ytarget variable, np.ndarray of string or int
meta_datadict (optional).

dictionary of characteristics, with keys “problemname” (string), booleans: “timestamps”, “missing”, “univariate”, “equallength”, “classlabel”, “targetlabel” and “class_values”: [],

Raises:
IOError if the load fails.