Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpaillard committed Nov 7, 2024
1 parent d450ffb commit 066eb09
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hidimstat/loco.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def predict(self, X, y):
- 'importance': the importance scores for each group.
"""
check_is_fitted(self.estimator)
if len(self._list_estimators) == 0:
raise ValueError("fit must be called before predict")
for m in self._list_estimators:
check_is_fitted(m)

Expand Down Expand Up @@ -168,6 +170,7 @@ def score(self, X, y):
the permuted data for each group.
- 'importance': the importance scores for each group.
"""
check_is_fitted(self.estimator)
if len(self._list_estimators) == 0:
raise ValueError("fit must be called before predict")
for m in self._list_estimators:
Expand Down

0 comments on commit 066eb09

Please sign in to comment.