API Reference#

Welcome to the API reference for skbase.

The API reference provides a technical manual, describing the class and function interface provided by the package. See the User Guide for additional details.

skbase contains tools for creating and working with parametric objects.

The included functionality makes it easy to reuse scikit-learn and sktime design principles in your project.

Base Classes#

BaseObject()

Base class for parametric objects with sktime style tag interface.

BaseEstimator()

Base class for estimators with scikit-learn and sktime design patterns.

BaseMetaObject()

Parameter and tag management for objects composed of named objects.

BaseMetaEstimator()

Parameter and tag management for estimators composed of named objects.

Object Retrieval#

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

Get a list of all objects in a package with name package_name.

get_package_metadata(package_name[, path, ...])

Return a dictionary mapping all package modules to their metadata.

Object Validation and Comparison#

check_sequence(input_seq[, sequence_type, ...])

Check whether an object is a sequence with optional check of element types.

check_sequence_named_objects()

Check if input is a sequence of named BaseObject instances.

check_type(input_, expected_type[, ...])

Check the input is the expected type.

is_sequence(input_seq[, sequence_type, ...])

Indicate if an object is a sequence with optional check of element types.

is_sequence_named_objects(seq_to_check[, ...])

Indicate if input is a sequence of named BaseObject instances.

Testing#

skbase.testing provides a framework to test BaseObject-s.

BaseFixtureGenerator()

Fixture generator for skbase testing functionality.

QuickTester()

Mixin class which adds the run_tests method to run tests on one object.

TestAllObjects()

Package level tests for BaseObjects.

Utils#

Utility functionality used through skbase.

flatten(obj)

Flatten nested list/tuple structure.

is_flat(obj)

Check whether iterable or sequence is flat.

make_strings_unique()

Make a list or tuple of strings unique by appending number of occurrence.

subset_dict_keys(input_dict, keys[, prefix, ...])

Subset dictionary so it only contains specified keys.

unflat_len(obj)

Return number of elements in nested iterable or sequence structure.

unflatten(obj, template)

Invert flattening given given template for nested list/tuple structure.