Skip to content

Commit

Permalink
Fix IsolationForest with max_samples="auto" (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes authored and hcho3 committed Jan 4, 2022
1 parent 5d80909 commit 0877988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/treelite/sklearn/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def import_model(sklearn_model):
raise TreeliteError("Gradient boosted trees must be trained with the option init='zero'")

if isinstance(sklearn_model, IsolationForest):
ratio_c = expected_depth(sklearn_model.max_samples)
ratio_c = expected_depth(sklearn_model.max_samples_)

node_count = []
children_left = ArrayOfArrays(dtype=np.int64)
Expand Down

0 comments on commit 0877988

Please sign in to comment.