@@ -1567,9 +1567,7 @@ def _fit_training_post_process(self, ds):
15671567 for feature_name in self .feature_names_in_ :
15681568 if feature_name in feature_used_names :
15691569 feature_index = np .where (feature_used_names == feature_name )
1570- feature_importance = self .feature_used_importances_ [
1571- feature_index
1572- ].ravel ()[2 ]
1570+ feature_importance = self .feature_used_importances_ [feature_index ][0 ]
15731571 else :
15741572 feature_importance = 0.0
15751573 feature_importances .append (feature_importance )
@@ -1672,10 +1670,7 @@ def get_feature_used_statistics(self, modeling_report):
16721670 [var .name for var in modeling_report .selected_variables ]
16731671 )
16741672 feature_used_importances_ = np .array (
1675- [
1676- [var .level , var .weight , var .importance ]
1677- for var in modeling_report .selected_variables
1678- ]
1673+ [var .importance for var in modeling_report .selected_variables ]
16791674 )
16801675 # Return empty arrays if no selected variables are available
16811676 else :
@@ -1810,20 +1805,10 @@ class KhiopsClassifier(ClassifierMixin, KhiopsPredictor):
18101805 The number of features used by the classifier.
18111806 feature_used_names_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, )
18121807 Names of the features used by the classifier.
1813- feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, 3)
1814- Level, Weight and Importance of the features used by the classifier:
1815-
1816- - Level: A measure of the predictive importance of the feature taken
1817- individually. It ranges between 0 (no predictive interest) and 1 (optimal
1818- predictive importance).
1819-
1820- - Weight: A measure of the predictive importance of the feature taken relative
1821- to all features selected by the classifier. It ranges between 0 (little
1822- contribution to the model) and 1 (large contribution to the model).
1823-
1824- - Importance: Average of the exact Shapley values of each used feature
1825- across the training data.
1826-
1808+ feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_,)
1809+ Importance of the features used by the classifier. The importance is
1810+ computed as the average of the exact Shapley values of each used feature
1811+ across the training dataset.
18271812 is_multitable_model_ : bool
18281813 ``True`` if the model was fitted on a multi-table dataset.
18291814 model_ : `.DictionaryDomain`
@@ -2238,20 +2223,10 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor):
22382223 The number of features used by the classifier.
22392224 feature_used_names_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, )
22402225 Names of the features used by the classifier.
2241- feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, 3)
2242- Level, Weight and Importance of the features used by the classifier:
2243-
2244- - Level: A measure of the predictive importance of the feature taken
2245- individually. It ranges between 0 (no predictive interest) and 1 (optimal
2246- predictive importance).
2247-
2248- - Weight: A measure of the predictive importance of the feature taken relative
2249- to all features selected by the classifier. It ranges between 0 (little
2250- contribution to the model) and 1 (large contribution to the model).
2251-
2252- - Importance: Average of the exact Shapley values of each used feature
2253- across the training data.
2254-
2226+ feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_,)
2227+ Importance of the features used by the classifier. The importance is
2228+ computed as the average of the exact Shapley values of each used feature
2229+ across the training dataset.
22552230 is_multitable_model_ : bool
22562231 ``True`` if the model was fitted on a multi-table dataset.
22572232 model_ : `.DictionaryDomain`
0 commit comments