-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHAPRFECV speedup for bigger use-cases and some simple refactoring. (#…
…252) This PR depends on the PR to be accepted: #248 ______ This cleanup removes some more unused code and simplifies parts of our implementations. It should allow for a boost in performance for bigger use-cases, although minimal. Also fix: - [x] #242 comments - [x] #255 - [x] #245
- Loading branch information
Reinier Koops
authored
Apr 23, 2024
1 parent
ab672d4
commit c1a6889
Showing
19 changed files
with
179,606 additions
and
5,608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
182,798 changes: 178,569 additions & 4,229 deletions
182,798
docs/tutorials/nb_shap_feature_elimination.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .feature_elimination import ShapRFECV, EarlyStoppingShapRFECV | ||
from .feature_elimination import ShapRFECV | ||
from .early_stopping_feature_elimination import EarlyStoppingShapRFECV | ||
|
||
__all__ = ["ShapRFECV", "EarlyStoppingShapRFECV"] |
543 changes: 543 additions & 0 deletions
543
probatus/feature_elimination/early_stopping_feature_elimination.py
Large diffs are not rendered by default.
Oops, something went wrong.
1,398 changes: 416 additions & 982 deletions
1,398
probatus/feature_elimination/feature_elimination.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
from .exceptions import NotFittedError, UnsupportedModelError | ||
from .scoring import Scorer, get_scorers, get_single_scorer | ||
from .exceptions import NotFittedError | ||
from .arrayfuncs import ( | ||
assure_pandas_df, | ||
assure_pandas_series, | ||
preprocess_data, | ||
preprocess_labels, | ||
) | ||
from .scoring import Scorer, get_single_scorer | ||
from .shap_helpers import shap_calc, shap_to_df, calculate_shap_importance | ||
from ._utils import assure_list_of_strings | ||
from .base_class_interface import BaseFitComputeClass, BaseFitComputePlotClass | ||
|
||
__all__ = [ | ||
"NotFittedError", | ||
"UnsupportedModelError", | ||
"Scorer", | ||
"assure_pandas_df", | ||
"get_scorers", | ||
"assure_list_of_strings", | ||
"shap_calc", | ||
"shap_to_df", | ||
"calculate_shap_importance", | ||
"assure_pandas_df", | ||
"assure_pandas_series", | ||
"preprocess_data", | ||
"preprocess_labels", | ||
"BaseFitComputeClass", | ||
"BaseFitComputePlotClass", | ||
"NotFittedError", | ||
"get_single_scorer", | ||
"Scorer", | ||
"shap_calc", | ||
"shap_to_df", | ||
"calculate_shap_importance", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.