Skip to content

Commit

Permalink
Use probabilities when testing skl classifier export
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Oct 12, 2024
1 parent 98f3ff8 commit cffe894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/python/test_sklearn_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def test_skl_export_rf_classifier(dataset, max_depth, n_estimators):
tl_model = treelite.sklearn.import_model(clf)
clf2 = treelite.sklearn.export_model(tl_model)
assert isinstance(clf2, RandomForestClassifier)
np.testing.assert_almost_equal(clf2.predict(X), clf.predict(X))
np.testing.assert_almost_equal(clf2.predict_proba(X), clf.predict_proba(X))


@given(
Expand Down

0 comments on commit cffe894

Please sign in to comment.