SklearnToTsmlClusterer¶
- class tsml_eval.estimators.SklearnToTsmlClusterer(clusterer=None, pad_unequal=False, concatenate_channels=False, clone_estimator=True, random_state=None)[source]¶
Wrapper for sklearn estimators to use the tsml base class.
Methods
fit(X[, y])Wrap fit.
fit_predict(X[, y])Perform clustering on X and returns cluster labels.
Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
get_test_params([parameter_set])Return unit test parameter settings for the estimator.
predict(X)Wrap predict.
set_params(**params)Set the parameters of this estimator.
- fit_predict(X, y=None, **kwargs)[source]¶
Perform clustering on X and returns cluster labels.
- Parameters:
- Xarray-like of shape (n_samples, n_features)
Input data.
- yIgnored
Not used, present for API consistency by convention.
- **kwargsdict
Arguments to be passed to
fit.Added in version 1.4.
- Returns:
- labelsndarray of shape (n_samples,), dtype=np.int64
Cluster labels.
- get_metadata_routing()[source]¶
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
- routingMetadataRequest
A
MetadataRequestencapsulating routing information.
- get_params(deep=True)[source]¶
Get parameters for this estimator.
- Parameters:
- deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns:
- paramsdict
Parameter names mapped to their values.
- classmethod get_test_params(parameter_set: str | None = None) dict | List[dict][source]¶
Return unit test parameter settings for the estimator.
- Parameters:
- parameter_setNone or str, default=None
Name of the set of test parameters to return, for use in tests. If no special parameters are defined for a value, will return “default” set.
- Returns:
- paramsdict or list of dict
Parameters to create testing instances of the class.
- set_params(**params)[source]¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline). The latter have parameters of the form<component>__<parameter>so that it’s possible to update each component of a nested object.- Parameters:
- **paramsdict
Estimator parameters.
- Returns:
- selfestimator instance
Estimator instance.