sklearn_to_sktime#
- sklearn_to_sktime(estimator)[source]#
Coerces an sklearn estimator to the sktime pipeline interface.
Creates a pipeline of two elements, the identity transformer and the estimator. The identity transformer acts as adapter and holds sktime base class logic.
Developer note: Type dispatch logic is in the transformer base class, in the
__mul__
dunder.- Parameters:
- estimatorsklearn compatible estimator
can be classifier, regressor, transformer, clusterer
- Returns:
- pipesktime estimator of corresponding time series type
classifiers, regressors, clusterers are converted to time series counterparts by flattening time series. Assumes equal length time series. transformers are converted to time series transformer by application per series