ObliqueTreeStump#
- class ObliqueTreeStump[source]#
Bases:
objectMixin of the oblique stumps (ObliqueDecisionTreeStumpClassifier and ObliqueDecisionTreeStumpRegressor): the oblique transformer built from the parameters of the stump, and the rule of the split.
The subclass defines the parameters and the splitter, by deriving also from the decision tree stump of its task (
class ObliqueDecisionTreeStumpClassifier(ObliqueTreeStump, DecisionTreeStumpClassifier)).- property coefficients#
Coefficients of the combination of the split, None if not fitted.
- get_rule(columns_names=None, scaler=None, float_precision=3)[source]#
Rule of the split, e.g.
0.8 * X_2 - 0.6 * X_3 <= 1.5.- Parameters:
- Returns:
rule –
feature_idx(the columns of the combination),coefficients,threshold,is_categorical,feature_name(the combination), the condition of the left child (textual_rule,blob_rule) and its negation. Empty if the stump is not fitted.- Return type:
- Raises:
ValueError – If a scaler is given.