Skip to content

Commit

Permalink
Fixes bug when using LCHT with an Evaluator.
Browse files Browse the repository at this point in the history
- Override partial_fit to infer classes by default.
  • Loading branch information
jacobmontiel committed Nov 15, 2018
1 parent 0b97519 commit 19cd95e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/skmultiflow/trees/lc_hoeffding_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 19cd95e

Please sign in to comment.