Skip to content

Splitter Class#

Splitter #

Splitter(X, Y, criteria)

Splitter class used to create splits of the data.

get_split #

get_split(indices, feature_indices)
Function that finds the best split of the dataset

Parameters:

Name Type Description Default
indices memoryview of NDArray

Indices for which to find a split.

required
feature_indices memoryview of NDArray

Features at which to consider splitting.

required

Returns:

Type Description
(list, double, int, double, double)

Returns the best split of the dataset, with the values being: (1) a list containing the left and right indices, (2) the best threshold for doing the splits, (3) what feature to split on, (4) the best criteria score, and (5) the best impurity