Utility functions#

skpro has a number of modules dedicated to utilities:

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

  • skpro.registry, which contains utilities for estimator and tag search

  • skpro.utils, which contains generic utility functions.

Data Format Checking and Conversion#

skpro.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.

Estimator Search and Retrieval, Estimator Tags#

skpro.registry

Registry and lookup functionality.

all_objects([object_types, filter_tags, ...])

Get a list of all objects from skpro.

all_tags([object_types, as_dataframe])

Get a list of all tags from skpro.

check_tag_is_valid(tag_name, tag_value)

Check validity of a tag value.

Plotting#

skpro.utils.plotting

Utility functions for plotting.

plot_crossplot_interval(y_true, y_pred[, ...])

Probabilistic cross-plot for regression, truth vs prediction interval.

plot_crossplot_std(y_true, y_pred[, ax])

Probabilistic cross-plot for regression, error vs predictive standard deviation.

plot_crossplot_loss(y_true, y_pred, metric)

Cross-loss-plot for probabilistic regression.

Estimator Validity Checking#

skpro.utils.estimator_checks

Estimator checker for extension.

check_estimator(estimator[, ...])

Run all tests on one single estimator.