Skip to content

Commit

Permalink
Add inline comment
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Apr 2, 2024
1 parent fc47e39 commit 43682f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sklearn/tree/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,9 @@ def partial_fit(self, X, y, sample_weight=None, check_input=True, classes=None):
monotonic_cst = self.monotonic_cst_

# Build tree
# Note: this reconstructs the builder with the same state it had during the initial fit.
# This is necessary because the builder is not saved as part of the class, and thus
# the state may be lost if pickled/unpickled.
n_samples = X.shape[0]
criterion = self.criterion
if not isinstance(criterion, BaseCriterion):
Expand Down

0 comments on commit 43682f9

Please sign in to comment.