Skip to content

Commit 5cba973

Browse files
rmontananaclaude
andcommitted
Declare numpy explicitly and update CFS test expectations for mufs 1.0
numpy is imported directly in stree/Strees.py and Splitter.py; rely on the explicit declaration instead of scikit-learn's transitive pull. mufs 1.0.0 fixed the CFS merit denominator (k + 2*rff vs the old k + (k**2-k)*rff), so test_get_cfs_subspaces expects the new selection order. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1e2b6a7 commit 5cba973

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "STree"
7-
dependencies = ["scikit-learn>=1.8.0", "mufs"]
7+
dependencies = ["numpy", "scikit-learn>=1.8.0", "mufs>=1.0.0"]
88
license = "MIT"
99
license-files = ["LICENSE"]
1010
description = "Oblique decision tree with svm nodes."

stree/tests/Splitter_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ def test_get_best_subspaces_discrete(self):
263263
def test_get_cfs_subspaces(self):
264264
results = [
265265
(4, [1, 5, 9, 12]),
266-
(6, [1, 5, 9, 12, 4, 2]),
267-
(7, [1, 5, 9, 12, 4, 2, 3]),
266+
(6, [1, 5, 9, 12, 4, 15]),
267+
(7, [1, 5, 9, 12, 4, 15, 19]),
268268
]
269269
X, y = load_dataset(n_features=20, n_informative=7)
270270
for k, expected in results:

0 commit comments

Comments
 (0)