ObliquePivotTreeStump#
- class ObliquePivotTreeStump[source]#
Bases:
objectMixin of the oblique pivot stumps (ObliquePivotTreeStumpClassifier): the ObliquePivotTransformer built from the parameters of the stump, the pivots of the split and its rule, e.g.
0.7 * P_12 - 0.3 * P_57 <= 1.2.- property coefficients#
Coefficients of the combination of the split, None if not fitted.
- get_pivots()[source]#
Pivots of the node, as indices of instances of the training set.
- Returns:
pivots –
descriptives,discriminativesandcandidatespivots of the node, and the pivotsusedby the combination of the split.- Return type:
- get_rule(columns_names=None, scaler=None, float_precision=3)[source]#
Rule of the split, e.g.
0.7 * P_12 - 0.3 * P_57 <= 1.2, whereP_<i>is the distance from the training instancei.- Parameters:
columns_names (list of str, default=None) – Not used: the rule does not name the features.
scaler (TransformerMixin, default=None) – Not used: the distances are computed on the data standardized by the stump.
float_precision (int, default=3) – Number of decimals of the coefficients and of the threshold; None for no rounding.
- Returns:
rule – See RuleTreeBaseStump.get_rule; also
coefficients. Empty if the stump is not fitted.- Return type:
- get_plot_rule(columns_names=None, scaler=None, float_precision=3)[source]#
What the node of the split shows in
RuleTree.plot_tree: the rule, and the pivots of the combination as given to fit, drawn below it withshow_media.- Parameters:
- Returns:
rule –
label, andmedia_valueswith the pivots (seepivot_media()).- Return type: