SupervisedIntervals
SupervisedIntervals
- class SupervisedIntervals(n_intervals=50, min_interval_length=3, features=None, randomised_split_point=True, random_state=None, n_jobs=1, parallel_backend=None)[source]
Supervised interval feature transformer.
Extracts intervals in fit using the supervised process described in [1]. Interval sub-series are extracted for each input feature, and the usefulness of that feature extracted on an interval is evaluated using the Fisher score metric. Intervals are continually split in half, with the better scoring half retained as a feature for the transform.
Multivariate capability is added by running the supervised interval extraction process on each dimension of the input data.
As the extracted interval features are already extracted for the supervised evaluation in fit, the fit_transform method is recommended if the transformed fit data is required.
- Parameters:
- n_intervalsint, default=50
The number of times the supervised interval selection process is run. Each supervised extraction will output a varying amount of features based on series length, number of dimensions and the number of features.
- min_interval_lengthint, default=3
The minimum length of extracted intervals. Minimum value of 3.
- featuresfunction with a single 2d array-like parameter or list of said functions,
default=None
Functions used to extract features from selected intervals. If None, defaults to the following statistics used in [2]: [mean, median, std, slope, min, max, iqr, count_mean_crossing, count_above_mean].
- randomised_split_pointbool, default=True
If True, the split point for interval extraction is randomised as is done in [2] rather than split in half.
- random_stateint or None, default=None
Seed for random number generation.
- n_jobsint, default=1
The number of jobs to run in parallel for both fit and transform.
-1means using all processors.- parallel_backendstr, ParallelBackendBase instance or None, default=None
Specify the parallelisation backend implementation in joblib, if None a ‘prefer’ value of “threads” is used by default. Valid options are “loky”, “multiprocessing”, “threading” or a custom backend. See the joblib Parallel documentation for more details.
- Attributes:
- n_instances_int
The number of train cases.
- n_dims_int
The number of dimensions per case.
- series_length_int
The length of each series.
- intervals_list of tuples
Contains information for each feature extracted in fit. Each tuple contains the interval start, interval end, interval dimension and the feature extracted. Length will be the same as the amount of transformed features.
See also
RandomIntervals
Notes
Based on the authors (stevcabello) code: https://github.com/stevcabello/r-STSF/
References
[1]Cabello, N., Naghizade, E., Qi, J. and Kulik, L., 2020, November. Fast and accurate time series classification through supervised interval search. In 2020 IEEE International Conference on Data Mining (ICDM) (pp. 948-953). IEEE.
[2]Cabello, N., Naghizade, E., Qi, J. and Kulik, L., 2021. Fast, accurate and interpretable time series classification through randomization. arXiv preprint arXiv:2105.14876.
Methods
check_is_fitted([method_name])Check if the estimator has been fitted.
clone()Obtain a clone of the object with same hyper-parameters and config.
clone_tags(estimator[, tag_names])Clone tags from another object as dynamic override.
create_test_instance([parameter_set])Construct an instance of the class, using first test parameter set.
create_test_instances_and_names([parameter_set])Create list of all test instances and a list of names for them.
fit(X[, y])Fit transformer to X, optionally to y.
fit_transform(X[, y])Fit to data, then transform it.
get_class_tag(tag_name[, tag_value_default])Get class tag value from class, with tag level inheritance from parents.
get_class_tags()Get class tags from class, with tag level inheritance from parent classes.
get_config()Get config flags for self.
get_fitted_params([deep])Get fitted parameters.
get_param_defaults()Get object's parameter defaults.
get_param_names([sort])Get object's parameter names.
get_params([deep])Get a dict of parameters values for this object.
get_tag(tag_name[, tag_value_default, ...])Get tag value from instance, with tag level inheritance and overrides.
get_tags()Get tags from instance, with tag level inheritance and overrides.
get_test_params([parameter_set])Return testing parameter settings for the estimator.
inverse_transform(X[, y])Inverse transform X and return an inverse transformed version.
is_composite()Check if the object is composed of other BaseObjects.
load_from_path(serial)Load object from file location.
load_from_serial(serial)Load object from serialized memory container.
reset()Reset the object to a clean post-init state.
save([path, serialization_format])Save serialized self to bytes-like object or to (.zip) file.
set_config(**config_dict)Set config flags to given values.
set_features_to_transform(arr)Set transform_features to the given array.
set_params(**params)Set the parameters of this object.
set_random_state([random_state, deep, ...])Set random_state pseudo-random seed parameters for self.
set_tags(**tag_dict)Set instance level tag overrides to given values.
transform(X[, y])Transform X and return a transformed version.
update(X[, y, update_params])Update transformer with X, optionally y.

