@@ -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 :
@@ -1801,20 +1796,10 @@ class KhiopsClassifier(ClassifierMixin, KhiopsPredictor):
18011796 The number of features used by the classifier.
18021797 feature_used_names_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, )
18031798 Names of the features used by the classifier.
1804- feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, 3)
1805- Level, Weight and Importance of the features used by the classifier:
1806-
1807- - Level: A measure of the predictive importance of the feature taken
1808- individually. It ranges between 0 (no predictive interest) and 1 (optimal
1809- predictive importance).
1810-
1811- - Weight: A measure of the predictive importance of the feature taken relative
1812- to all features selected by the classifier. It ranges between 0 (little
1813- contribution to the model) and 1 (large contribution to the model).
1814-
1815- - Importance: Average of the exact Shapley values of each used feature
1816- across the training data.
1817-
1799+ feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_,)
1800+ Importance of the features used by the classifier. The importance is
1801+ computed as the average of the exact Shapley values of each used feature
1802+ across the training dataset.
18181803 is_multitable_model_ : bool
18191804 ``True`` if the model was fitted on a multi-table dataset.
18201805 model_ : `.DictionaryDomain`
@@ -2222,20 +2207,10 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor):
22222207 The number of features used by the classifier.
22232208 feature_used_names_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, )
22242209 Names of the features used by the classifier.
2225- feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, 3)
2226- Level, Weight and Importance of the features used by the classifier:
2227-
2228- - Level: A measure of the predictive importance of the feature taken
2229- individually. It ranges between 0 (no predictive interest) and 1 (optimal
2230- predictive importance).
2231-
2232- - Weight: A measure of the predictive importance of the feature taken relative
2233- to all features selected by the classifier. It ranges between 0 (little
2234- contribution to the model) and 1 (large contribution to the model).
2235-
2236- - Importance: Average of the exact Shapley values of each used feature
2237- across the training data.
2238-
2210+ feature_used_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_,)
2211+ Importance of the features used by the classifier. The importance is
2212+ computed as the average of the exact Shapley values of each used feature
2213+ across the training dataset.
22392214 is_multitable_model_ : bool
22402215 ``True`` if the model was fitted on a multi-table dataset.
22412216 model_ : `.DictionaryDomain`
0 commit comments