candidate_mask#
- candidate_mask(X, features, thresholds, is_categorical) ndarray[source]#
Instances that go to the left child of each candidate split. It uses n_samples * n_candidates bytes; a function can pass subsets of the candidates to process them in blocks.
- Parameters:
X (numpy.ndarray of shape (n_samples, n_features)) – Feature matrix.
features (numpy.ndarray of int of shape (n_candidates,)) – Column of each candidate.
thresholds (numpy.ndarray of shape (n_candidates,)) – Threshold or value of each candidate.
is_categorical (numpy.ndarray of bool of shape (n_candidates,)) – Whether each candidate is categorical.
- Returns:
left
- Return type:
numpy.ndarray of bool of shape (n_samples, n_candidates)