Data Input and Checking Utilities¶
This module has utilities for time series data input checking
-
seglearn.util.
get_ts_data_parts
(X)[source]¶ Separates time series data object into time series variables and contextual variables
- Parameters
- Xarray-like, shape [n_series, …]
Time series data and (optionally) contextual data
- Returns
- Xtarray-like, shape [n_series, ]
Time series data
- Xsarray-like, shape [n_series, n_contextd = np.colum _variables]
contextual variables
-
seglearn.util.
check_ts_data
(X, y=None)[source]¶ Checks time series data is good. If not raises value error.
- Parameters
- Xarray-like, shape [n_series, …]
Time series data and (optionally) contextual data
- Returns
- ts_targetbool
target (y) is a time series
-
seglearn.util.
check_ts_data_with_ts_target
(X, y=None)[source]¶ Checks time series data with time series target is good. If not raises value error.
- Parameters
- Xarray-like, shape [n_series, …]
Time series data and (optionally) contextual data
- yarray-like, shape [n_series, …]
target data
-
seglearn.util.
ts_stats
(Xt, y, fs=1.0, class_labels=None)[source]¶ Generates some helpful statistics about the data X
- Parameters
- Xarray-like, shape [n_series, …]
Time series data and (optionally) contextual data
- yarray-like, shape [n_series]
target data
- fsfloat
sampling frequency
- class_labelslist of strings, default None
List of target class names
- Returns
- resultsdict
- Dictionary of relevant statistics for the time series dataresults[‘total’] has stats for the whole data setresults[‘by_class’] has stats segragated by target class