toys.model_selection

Functions

combinations

Cross validation splitting

KFold

Type aliases

These type aliases exist to aid in documentation and static analysis. They are irrelevant at runtime.

class CrossValSplitter = Callable[[Dataset], Iterable[Fold]]

A function that takes a dataset and returns an iterable over some Fold s of the dataset. These can be used by meta-estimators, like GridSearchCV, to test how estimators generalize to unseen data.

class Fold = Tuple[Dataset, Dataset]

A fold is the partitioning of a dataset into two disjoint subsets, (train, test).

class ParamGrid = Mapping[str, Sequence]