ProximityTreeStump#
- class ProximityTreeStump[source]#
Bases:
objectMixin of the proximity stumps for time series (ProximityTreeStumpClassifier and ProximityTreeStumpRegressor): the ProximityTransformer built from the parameters of the stump, the rule and its drawing.
The subclass defines the parameters and the splitter, by deriving also from the shapelet stump of its task (
class ProximityTreeStumpClassifier(ProximityTreeStump, ShapeletTreeStumpClassifier)).- get_rule(columns_names=None, scaler=None, float_precision: int | None = 3)[source]#
Rule of the split,
euclidean(TS, green_shp) <= euclidean(TS, red_shp): the time series closer to the first shapelet (green in the drawing,st.shapelets[0]) than to the second one (red,st.shapelets[1]) go left.- Parameters:
- Returns:
rule – See RuleTreeBaseStump.get_rule.
- Return type:
- Raises:
ValueError – If a scaler is given.
- get_plot_rule(columns_names=None, scaler=None, float_precision: int | None = 3)[source]#
What the node of the split shows in
RuleTree.plot_tree: the rule, and the two shapelets, green and red as in the rule, on the arrows of the two children: the green one on the left arrow (the series closer to it), the red one on the right arrow.- Parameters:
- Returns:
rule –
label,media_values(the two shapelets),media_kind,media_names, theirmedia_colorsandmedia_on_edges(True).- Return type: