From 19cd95e54fb7edf3e3117f332b4eab157d6775e2 Mon Sep 17 00:00:00 2001 From: Jacob Montiel Date: Thu, 15 Nov 2018 12:16:32 +0100 Subject: [PATCH] Fixes bug when using LCHT with an Evaluator. - Override partial_fit to infer classes by default. --- src/skmultiflow/trees/lc_hoeffding_tree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/skmultiflow/trees/lc_hoeffding_tree.py b/src/skmultiflow/trees/lc_hoeffding_tree.py index 693835890..3f38b0dea 100644 --- a/src/skmultiflow/trees/lc_hoeffding_tree.py +++ b/src/skmultiflow/trees/lc_hoeffding_tree.py @@ -104,6 +104,9 @@ def n_labels(self, n_labels): raise ValueError('The number of labels must be specified') self._n_labels = n_labels + def partial_fit(self, X, y, classes=None, weight=None): + super().partial_fit(X, y, weight=weight) # Override HT, infer the classes + class LCActiveLearningNode(HoeffdingTree.ActiveLearningNode): def __init__(self, initial_class_observations):