Utility functions#

sktime has a number of modules dedicated to utilities:

  • sktime.datatypes, which contains utilities for data format checks and conversion.

  • sktime.pipeline, which contains generics for pipeline construction.

  • sktime.registry, which contains utilities for estimator and tag search, as well as serialization of estimator blueprints as strings.

  • sktime.utils, which contains generic utility functions.

Data Format Checking and Conversion#

sktime.datatypes

Module exports: data type definitions, checks, validation, fixtures, converters.

convert_to(obj, to_type[, as_scitype, ...])

Convert object to a different machine representation, subject to scitype.

convert(obj, from_type, to_type[, ...])

Convert objects between different machine representations, subject to scitype.

check_raise(obj, mtype[, scitype, var_name])

Check object for compliance with mtype specification, raise errors.

check_is_mtype(obj, mtype[, scitype, ...])

Check object for compliance with mtype specification, return metadata.

check_is_scitype(obj, scitype[, ...])

Check object for compliance with scitype specification, return metadata.

mtype(obj[, as_scitype, exclude_mtypes])

Infer the mtype of an object considered as a specific scitype.

scitype(obj[, candidate_scitypes, ...])

Infer the scitype of an object.

mtype_to_scitype(mtype[, return_unique, ...])

Infer scitype belonging to mtype.

scitype_to_mtype(scitype[, softdeps])

Return list of all mtypes belonging to scitype.

Pipeline construction generics#

sktime.pipeline

Pipeline maker utility.

make_pipeline(*steps)

Create a pipeline from estimators of any type.

sklearn_to_sktime(estimator)

Coerces an sklearn estimator to the sktime pipeline interface.

Estimator Search and Retrieval, Estimator Tags#

sktime.registry

Registry for sktime estimator base classes, tags, global aliases.

all_estimators([estimator_types, ...])

Get a list of all estimators from sktime.

all_tags([estimator_types, as_dataframe])

Get a list of all tags from sktime.

check_tag_is_valid(tag_name, tag_value)

Check validity of a tag value.

Estimator Blueprint Serialization#

sktime.registry

Registry for sktime estimator base classes, tags, global aliases.

craft(spec)

Instantiate an object from the specification string.

deps(spec)

Get PEP 440 dependency requirements for a craft spec.

imports(spec)

Get import code block for a craft spec.

Plotting#

sktime.utils.plotting

Common timeseries plotting functionality.

plot_series(*series[, labels, markers, ...])

Plot one or more time series.

plot_lags(series[, lags, suptitle])

Plot one or more lagged versions of a time series.

plot_correlations(series[, lags, alpha, ...])

Plot series and its ACF and PACF values.

Estimator Validity Checking#

sktime.utils.estimator_checks

Estimator checker for extension.

check_estimator(estimator[, ...])

Run all tests on one single estimator.