Skip to content

Commit

Permalink
FIX attempt to fix list index
Browse files Browse the repository at this point in the history
  • Loading branch information
PSSF23 committed Aug 22, 2023
1 parent 2cc68ae commit 01c1e55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sktree/tree/_honest_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ def partial_fit(self, X, y, sample_weight=None, check_input=True, classes=None):
classes=classes,
)
return self

rng = np.random.default_rng(self.random_state)

if sample_weight is None:
Expand All @@ -423,7 +424,7 @@ def partial_fit(self, X, y, sample_weight=None, check_input=True, classes=None):
_sample_weight[self.honest_indices_] = 0

if classes is None:
classes = np.unique(y)
classes = np.unique(y).tolist()

self.estimator_.partial_fit(
X,
Expand Down Expand Up @@ -560,7 +561,7 @@ def _fit(
self.estimator_ = deepcopy(self.tree_estimator)

if classes is None:
classes = np.unique(y)
classes = np.unique(y).tolist()

# Learn structure on subsample
self.estimator_._fit(
Expand Down

0 comments on commit 01c1e55

Please sign in to comment.