Skip to content

Commit

Permalink
[MNT] Fix sporadic PF breakage and matplotlib version bound (#1906)
Browse files Browse the repository at this point in the history
* fixes

* Update pyproject.toml
  • Loading branch information
MatthewMiddlehurst authored Aug 5, 2024
1 parent 7eb8e76 commit f30fff0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_univariate():
"""Test that the function gives appropriate error message."""
X, y = load_unit_test()
X_multivariate = X.reshape((-1, 2, 12))
clf = ProximityForest(n_trees=5, random_state=42, n_jobs=-1)
clf = ProximityForest(n_trees=5)
with pytest.raises(ValueError):
clf.fit(X_multivariate, y)

Expand All @@ -20,7 +20,7 @@ def test_proximity_forest():
"""Test the fit method of ProximityTree."""
X_train, y_train = load_unit_test()
X_test, y_test = load_unit_test(split="test")
clf = ProximityForest(n_trees=5, n_splitters=3, max_depth=4)
clf = ProximityForest(n_trees=5, n_splitters=3, max_depth=4, random_state=42)
clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
score = accuracy_score(y_test, y_pred)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ all_extras = [
"imbalanced-learn",
"keras-self-attention",
"kotsu>=0.3.1",
"matplotlib>=3.3.2",
"matplotlib>=3.3.2,<3.9.0",
"pmdarima>=1.8.0",
"prophet>=1.1.0",
"pydot>=2.0.0",
Expand Down

0 comments on commit f30fff0

Please sign in to comment.