|
45 | 45 | import khiops.core.internals.filesystems as fs |
46 | 46 | from khiops.core.dictionary import DictionaryDomain |
47 | 47 | from khiops.core.helpers import build_multi_table_dictionary_domain |
48 | | -from khiops.core.internals.common import ( |
49 | | - is_dict_like, |
50 | | - is_list_like, |
51 | | - type_error_message, |
52 | | -) |
| 48 | +from khiops.core.internals.common import is_dict_like, is_list_like, type_error_message |
53 | 49 | from khiops.sklearn.dataset import ( |
54 | 50 | Dataset, |
55 | 51 | get_khiops_variable_name, |
@@ -446,7 +442,6 @@ def _fit_train_model(self, ds, computation_dir, **kwargs): |
446 | 442 |
|
447 | 443 | - self.model_ |
448 | 444 | - self.model_report_ |
449 | | - - self.model_report_raw_ (deprecated) |
450 | 445 | """ |
451 | 446 |
|
452 | 447 | @abstractmethod |
@@ -655,10 +650,6 @@ class KhiopsCoclustering(ClusterMixin, KhiopsEstimator): |
655 | 650 | The name of the main Khiops dictionary within the ``model_`` domain. |
656 | 651 | model_report_ : `.CoclusteringResults` |
657 | 652 | The Khiops report object. |
658 | | - model_report_raw_ : dict |
659 | | - JSON object of the Khiops report. |
660 | | - **Deprecated** will be removed in Khiops 11. Use the ``json_data`` |
661 | | - attribute of the ``model_report_`` estimator attribute instead. |
662 | 653 |
|
663 | 654 | Examples |
664 | 655 | -------- |
@@ -797,7 +788,6 @@ def _fit_train_model(self, ds, computation_dir, **kwargs): |
797 | 788 |
|
798 | 789 | # Save the report file |
799 | 790 | self.model_report_ = kh.read_coclustering_results_file(coclustering_file_path) |
800 | | - self.model_report_raw_ = self.model_report_.json_data |
801 | 791 |
|
802 | 792 | # Save the id column |
803 | 793 | if "id_column" in kwargs: |
@@ -1037,7 +1027,6 @@ def _simplify( |
1037 | 1027 | simplified_cc.model_report_ = kh.read_coclustering_results_file( |
1038 | 1028 | simplified_coclustering_file_path |
1039 | 1029 | ) |
1040 | | - simplified_cc.model_report_raw_ = simplified_cc.model_report_.json_data |
1041 | 1030 |
|
1042 | 1031 | # Build the individual-variable coclustering model |
1043 | 1032 | self._create_coclustering_model_domain( |
@@ -1323,7 +1312,6 @@ def _fit_train_model(self, ds, computation_dir, **kwargs): |
1323 | 1312 | # Save the model domain object and report |
1324 | 1313 | self.model_ = self._read_model_from_dictionary_file(model_kdic_file_path) |
1325 | 1314 | self.model_report_ = kh.read_analysis_results_file(report_file_path) |
1326 | | - self.model_report_raw_ = self.model_report_.json_data |
1327 | 1315 |
|
1328 | 1316 | @abstractmethod |
1329 | 1317 | def _fit_core_training_function(self, *args, **kwargs): |
@@ -1451,10 +1439,10 @@ def _fit_training_post_process(self, ds): |
1451 | 1439 | else: |
1452 | 1440 | pair_feature_evaluated_names_ = [] |
1453 | 1441 | pair_feature_evaluated_levels_ = [] |
1454 | | - if "treePreparationReport" in self.model_report_raw_: |
1455 | | - tree_preparation_report = self.model_report_raw_["treePreparationReport"][ |
1456 | | - "variablesStatistics" |
1457 | | - ] |
| 1442 | + if "treePreparationReport" in self.model_report_.json_data: |
| 1443 | + tree_preparation_report = self.model_report_.json_data[ |
| 1444 | + "treePreparationReport" |
| 1445 | + ]["variablesStatistics"] |
1458 | 1446 | tree_feature_evaluated_names_ = [ |
1459 | 1447 | tree_preparation_report[i]["name"] |
1460 | 1448 | for i in range(0, len(tree_preparation_report)) |
@@ -1807,10 +1795,6 @@ class KhiopsClassifier(ClassifierMixin, KhiopsPredictor): |
1807 | 1795 | The name of the main Khiops dictionary within the ``model_`` domain. |
1808 | 1796 | model_report_ : `.AnalysisResults` |
1809 | 1797 | The Khiops report object. |
1810 | | - model_report_raw_ : dict |
1811 | | - JSON object of the Khiops report. |
1812 | | - **Deprecated** will be removed in Khiops 11. Use the ``json_data`` |
1813 | | - attribute of the ``model_report_`` estimator attribute instead. |
1814 | 1798 |
|
1815 | 1799 | Examples |
1816 | 1800 | -------- |
@@ -2198,10 +2182,6 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor): |
2198 | 2182 | The name of the main Khiops dictionary within the ``model_`` domain. |
2199 | 2183 | model_report_ : `.AnalysisResults` |
2200 | 2184 | The Khiops report object. |
2201 | | - model_report_raw_ : dict |
2202 | | - JSON object of the Khiops report. |
2203 | | - **Deprecated** will be removed in Khiops 11. Use the ``json_data`` |
2204 | | - attribute of the ``model_report_`` estimator attribute instead. |
2205 | 2185 |
|
2206 | 2186 | Examples |
2207 | 2187 | -------- |
@@ -2448,10 +2428,6 @@ class KhiopsEncoder(TransformerMixin, KhiopsSupervisedEstimator): |
2448 | 2428 | The name of the main Khiops dictionary within the ``model_`` domain. |
2449 | 2429 | model_report_ : `.AnalysisResults` |
2450 | 2430 | The Khiops report object. |
2451 | | - model_report_raw_ : dict |
2452 | | - JSON object of the Khiops report. |
2453 | | - **Deprecated** will be removed in Khiops 11. Use the ``json_data`` |
2454 | | - attribute of the ``model_report_`` estimator attribute instead. |
2455 | 2431 |
|
2456 | 2432 | Examples |
2457 | 2433 | -------- |
|
0 commit comments