Skip to content

khiops.sklearn.helpers

Submodule of khiops.sklearn

General helper functions

FUNCTION DESCRIPTION
train_test_split_dataset

Splits a multi-table dataset spec into train and test

Classes

Functions:

train_test_split_dataset(ds_spec, y=None, test_size=0.25, **kwargs)

Splits a multi-table dataset spec into train and test

PARAMETER DESCRIPTION
ds_spec

A dict multi-table dataset specification (see Multi-Table Learning Primer). Only Pandas, NumPy, SciPy tables are accepted in the spec.

TYPE: `dict`

y

The target values. n_samples is the number of rows of the main table in ds_spec.

TYPE: array-like of size (n_samples,) DEFAULT: None

test_size

The proportion of the dataset (between 0.0 and 1.0) to be included in the test split.

TYPE: float DEFAULT: 0.25

See Also
RAISES DESCRIPTION
TypeError

If ds_spec is not dict-like.

ValueError

If the tables in ds_spec are file-paths.

Examples:

See the following functions of the samples_sklearn.py documentation script: