SplitCandidate¶

class SplitCandidate(feature_idx, threshold, gain, left_indices, right_indices, is_oblique=False, oblique_weights=None, validation_score=None, variance_estimate=None, consensus_support=None)[source]¶

Bases: object

Represents a potential split with all relevant information.

feature_idx¶

Index of the feature to split on.

Type:

int

threshold¶

Threshold value for the split.

Type:

float

gain¶

Information gain or improvement from this split.

Type:

float

left_indices¶

Indices of samples going to left child.

Type:

numpy.ndarray[tuple[Any, …], numpy.dtype[numpy.int64]]

right_indices¶

Indices of samples going to right child.

Type:

numpy.ndarray[tuple[Any, …], numpy.dtype[numpy.int64]]

is_oblique¶

Whether this is an oblique (linear combination) split.

Type:

bool

oblique_weights¶

Weights for oblique split, None for axis-aligned splits.

Type:

numpy.ndarray[tuple[Any, …], numpy.dtype[numpy.floating]] | None

validation_score¶

Validation score for this split.

Type:

float | None

variance_estimate¶

Estimated variance for this split.

Type:

float | None

consensus_support¶

Consensus support score from bootstrap sampling.

Type:

float | None

__init__(feature_idx, threshold, gain, left_indices, right_indices, is_oblique=False, oblique_weights=None, validation_score=None, variance_estimate=None, consensus_support=None)¶

Methods

__init__(feature_idx, threshold, gain, ...)

Attributes

feature_idx: int¶
threshold: float¶
gain: float¶
left_indices: ndarray[tuple[Any, ...], dtype[int64]]¶
right_indices: ndarray[tuple[Any, ...], dtype[int64]]¶
is_oblique: bool¶
oblique_weights: ndarray[tuple[Any, ...], dtype[floating]] | None¶
validation_score: float | None¶
variance_estimate: float | None¶
consensus_support: float | None¶
__init__(feature_idx, threshold, gain, left_indices, right_indices, is_oblique=False, oblique_weights=None, validation_score=None, variance_estimate=None, consensus_support=None)¶