@@ -1449,59 +1449,6 @@ def _fit_training_post_process(self, ds):
14491449 if self .model_main_dictionary_name_ is None :
14501450 raise ValueError ("No model dictionary after Khiops call" )
14511451
1452- # Extract, from the preparation reports, the number of evaluated features,
1453- # their names and their levels
1454- univariate_preparation_report = self .model_report_ .preparation_report
1455- if self .model_report_ .bivariate_preparation_report is not None :
1456- bivariate_preparation_report = (
1457- self .model_report_ .bivariate_preparation_report
1458- )
1459- pair_feature_evaluated_names_ = (
1460- bivariate_preparation_report .get_variable_pair_names ()
1461- )
1462- pair_feature_evaluated_levels_ = [
1463- bivariate_preparation_report .get_variable_pair_statistics (* var ).level
1464- for var in bivariate_preparation_report .get_variable_pair_names ()
1465- ]
1466- else :
1467- pair_feature_evaluated_names_ = []
1468- pair_feature_evaluated_levels_ = []
1469- if self .model_report_ .tree_preparation_report is not None :
1470- tree_preparation_report = self .model_report_ .tree_preparation_report
1471- tree_feature_evaluated_names_ = tree_preparation_report .get_variable_names ()
1472- tree_feature_evaluated_levels_ = [
1473- tree_preparation_report .get_variable_statistics (var ).level
1474- for var in tree_preparation_report .get_variable_names ()
1475- ]
1476- else :
1477- tree_feature_evaluated_names_ = []
1478- tree_feature_evaluated_levels_ = []
1479-
1480- feature_evaluated_names_ = (
1481- univariate_preparation_report .get_variable_names ()
1482- + pair_feature_evaluated_names_
1483- + tree_feature_evaluated_names_
1484- )
1485- feature_evaluated_importances_ = np .array (
1486- [
1487- univariate_preparation_report .get_variable_statistics (var ).level
1488- for var in univariate_preparation_report .get_variable_names ()
1489- ]
1490- + pair_feature_evaluated_levels_
1491- + tree_feature_evaluated_levels_
1492- )
1493-
1494- # Sort the features by level
1495- combined = list (zip (feature_evaluated_names_ , feature_evaluated_importances_ ))
1496- combined .sort (key = lambda x : x [1 ], reverse = True )
1497-
1498- # Set the sklearn attributes
1499- self .feature_evaluated_names_ = np .array (
1500- [x [0 ] for x in combined ], dtype = np .dtype ("object" )
1501- )
1502- self .feature_evaluated_importances_ = np .array ([x [1 ] for x in combined ])
1503- self .n_features_evaluated_ = len (combined )
1504-
15051452 def _transform_check_dataset (self , ds ):
15061453 assert isinstance (ds , Dataset ), "'ds' is not 'Dataset'"
15071454
@@ -1859,13 +1806,6 @@ class KhiopsClassifier(ClassifierMixin, KhiopsPredictor):
18591806 - the ``n_pairs`` parameter must be left to its default value, 0;
18601807 - the ``n_text_features`` parameter must be set to 0.
18611808
1862- n_features_evaluated_ : int
1863- The number of features evaluated by the classifier.
1864- feature_evaluated_names_ : `ndarray <numpy.ndarray>` of shape (n_features_evaluated\_,)
1865- Names of the features evaluated by the classifier.
1866- feature_evaluated_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_evaluated\_,)
1867- Level of the features evaluated by the classifier.
1868- See below for a definition of the level.
18691809 n_features_used_ : int
18701810 The number of features used by the classifier.
18711811 feature_used_names_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, )
@@ -2294,13 +2234,6 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor):
22942234 - the ``n_pairs`` parameter must be left to its default value, 0;
22952235 - the ``n_text_features`` parameter must be set to 0.
22962236
2297- n_features_evaluated_ : int
2298- The number of features evaluated by the classifier.
2299- feature_evaluated_names_ : `ndarray <numpy.ndarray>` of shape (n_features_evaluated\_,)
2300- Names of the features evaluated by the classifier.
2301- feature_evaluated_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_evaluated\_,)
2302- Level of the features evaluated by the classifier.
2303- See below for a definition of the level.
23042237 n_features_used_ : int
23052238 The number of features used by the classifier.
23062239 feature_used_names_ : `ndarray <numpy.ndarray>` of shape (n_features_used\_, )
@@ -2561,14 +2494,6 @@ class KhiopsEncoder(TransformerMixin, KhiopsSupervisedEstimator):
25612494
25622495 Attributes
25632496 ----------
2564- n_features_evaluated_ : int
2565- The number of features evaluated by the classifier.
2566- feature_evaluated_names_ : `ndarray <numpy.ndarray>` of shape (n_features_evaluated\_,)
2567- Names of the features evaluated by the classifier.
2568- feature_evaluated_importances_ : `ndarray <numpy.ndarray>` of shape (n_features_evaluated\_,)
2569- Level of the features evaluated by the classifier. The Level is measure of the
2570- predictive importance of the feature taken individually. It ranges between 0 (no
2571- predictive interest) and 1 (optimal predictive importance).
25722497 is_multitable_model_ : bool
25732498 ``True`` if the model was fitted on a multi-table dataset.
25742499 model_ : `.DictionaryDomain`
0 commit comments