Skip to content

Commit 54fa2b9

Browse files
committed
adapted feature importances docstring
1 parent 11cbd67 commit 54fa2b9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

photonai/base/hyperpipe.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,9 @@ def score(self, data: np.ndarray, y: np.ndarray, **kwargs) -> np.ndarray:
11691169

11701170
def get_permutation_feature_importances(self, **kwargs):
11711171
"""
1172-
Since PHOTONAI is built on top of the scikit-learn interface,
1173-
it is possible to use direct functions from their package.
1174-
Here the example of the [feature importance via permutations](
1175-
https://scikit-learn.org/stable/modules/generated/sklearn.inspection.permutation_importance.html).
1172+
Fits a model for the best config of each outer fold (using the training data of that fold).
1173+
Then calls sklearn.inspection.permutation_importance with the test data and the given kwargs (e.g. n_repeats).
1174+
Returns mean of "importances_mean" and of "importances_std" of all outer folds.
11761175
11771176
Parameters:
11781177
X_val:
@@ -1188,7 +1187,7 @@ def get_permutation_feature_importances(self, **kwargs):
11881187
Keyword arguments, passed to sklearn.permutation_importance.
11891188
11901189
Returns:
1191-
Dictionary-like object, with the following attributes: importances_mean, importances_std, importances.
1190+
Dictionary with average of "mean" and "std" for all outer folds, respectively.
11921191
11931192
"""
11941193

0 commit comments

Comments
 (0)