SignatureClassifier
SignatureClassifier
- class SignatureClassifier(estimator=None, augmentation_list=('basepoint', 'addtime'), window_name='dyadic', window_depth=3, window_length=None, window_step=None, rescaling=None, sig_tfm='signature', depth=4, random_state=None)[source]
Classification module using signature-based features.
This simply initialises the SignatureTransformer class which builds the feature extraction pipeline, then creates a new pipeline by appending a classifier after the feature extraction step.
- The default parameters are set to best practice parameters found in
“A Generalised Signature Method for Multivariate TimeSeries” [1]
Note that the final classifier used on the UEA datasets involved tuning the hyper-parameters:
depthover [1, 2, 3, 4, 5, 6]window_depthover [2, 3, 4]RandomForestClassifierhyper-parameters.
as these were found to be the most dataset dependent hyper-parameters.
Thus, we recommend always tuning at least these parameters to any given dataset.
- Parameters:
- estimatorsklearn estimator, default=RandomForestClassifier
This should be any sklearn-type estimator. Defaults to RandomForestClassifier.
- augmentation_list: list of tuple of strings, default=(“basepoint”, “addtime”)
List of augmentations to be applied before the signature transform is applied.
- window_name: str, default=”dyadic”
The name of the window transform to apply.
- window_depth: int, default=3
The depth of the dyadic window. (Active only if
window_name == 'dyadic'].- window_length: int, default=None
The length of the sliding/expanding window. (Active only if `window_name in [‘sliding, ‘expanding’].
- window_step: int, default=None
The step of the sliding/expanding window. (Active only if `window_name in [‘sliding, ‘expanding’].
- rescaling: str, default=None
The method of signature rescaling.
- sig_tfm: str, default=”signature”
String to specify the type of signature transform. One of: [‘signature’, ‘logsignature’]).
- depth: int, default=4
Signature truncation depth.
- random_state: int, default=None
Random state initialisation.
- Attributes:
- signature_method: sklearn.Pipeline
An sklearn pipeline that performs the signature feature extraction step.
- pipeline: sklearn.Pipeline
The classifier appended to the
signature_methodpipeline to make a classification pipeline.- n_classes_int
Number of classes. Extracted from the data.
- classes_ndarray of shape (n_classes_)
Holds the label for each class.
See also
SignatureTransformer
References
[1]Morrill, James, et al. “A generalised signature method for multivariate time series feature extraction.” arXiv preprint arXiv:2006.00873 (2020). https://arxiv.org/pdf/2006.00873.pdf
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 time series classifier to training data.
fit_predict(X, y[, cv, change_state])Fit and predict labels for sequences in X.
fit_predict_proba(X, y[, cv, change_state])Fit and predict labels probabilities for sequences in X.
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.
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.
predict(X)Predicts labels for sequences in X.
predict_proba(X)Predicts labels probabilities for sequences in X.
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.
score(X, y)Scores predicted labels against ground truth labels on X.
set_config(**config_dict)Set config flags to given values.
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.

