@@ -199,7 +199,7 @@ def _preprocess_task_arguments(task_args):
199199 else :
200200 if not task_args ["target_variable" ] and task_args [
201201 "discretization_method"
202- ] not in ("EqualWidth" , "EqualLenght " , "None" ):
202+ ] not in ("EqualWidth" , "EqualFrequency " , "None" ):
203203 raise ValueError (
204204 "'discretization_method' must be either "
205205 "'EqualWidth', 'EqualFrequency' or 'None'."
@@ -261,6 +261,44 @@ def _preprocess_task_arguments(task_args):
261261 if isinstance (task_args ["selection_value" ], (int , float )):
262262 task_args ["selection_value" ] = str (task_args ["selection_value" ])
263263
264+ # Warn the simple deprecations for Khiops 11
265+ simple_khiops_11_deprecations = [
266+ ("max_groups" , "the upcoming 'max_parts' parameter" , 0 ),
267+ ("max_intervals" , "the upcoming 'max_parts' parameter" , 0 ),
268+ ("min_group_frequency" , None , 0 ),
269+ ("min_interval_frequency" , None , 0 ),
270+ ("results_prefix" , None , "" ),
271+ ("snb_predictor" , None , True ),
272+ ("univariate_predictor_number" , None , 0 ),
273+ ]
274+ for param , replacement_param , param_default_value in simple_khiops_11_deprecations :
275+ if param in task_args and task_args [param ] != param_default_value :
276+ warnings .warn (
277+ deprecation_message (
278+ f"'{ param } '" , "11.0.0" , replacement = replacement_param , quote = False
279+ )
280+ )
281+
282+ # Warn the grouping/interval supervised method deprecation values for Khiops 11
283+ if "target_variable" in task_args and task_args ["target_variable" ] != "" :
284+ if "grouping_method" in task_args and task_args ["grouping_method" ] != "MODL" :
285+ warnings .warn (
286+ deprecation_message (
287+ "'grouping_method' on supervised learning" , "11.0.0" , quote = False
288+ )
289+ )
290+ if (
291+ "discretization_method" in task_args
292+ and task_args ["discretization_method" ] != "MODL"
293+ ):
294+ warnings .warn (
295+ deprecation_message (
296+ f"'discretization_method' on supervised learning" ,
297+ "11.0.0" ,
298+ quote = False ,
299+ )
300+ )
301+
264302 return task_called_with_domain
265303
266304
@@ -679,8 +717,8 @@ def train_predictor(
679717 Maximum number of variables pairs to construct.
680718 specific_pairs : list of tuple, optional
681719 User-specified pairs as a list of 2-tuples of variable names. If a given tuple
682- contains only one non-empty string generated within the maximum limit
683- ``max_pairs``.
720+ contains only one non-empty variable name, then it generates all the pairs
721+ containing it (within the limit ``max_pairs``) .
684722 all_possible_pairs : bool, default ``True``
685723 If ``True`` tries to create all possible pairs within the limit ``max_pairs``.
686724 The pairs and variables given in ``specific_pairs`` have priority.
@@ -989,8 +1027,8 @@ def train_recoder(
9891027 Maximum number of variables pairs to construct.
9901028 specific_pairs : list of tuple, optional
9911029 User-specified pairs as a list of 2-tuples of variable names. If a given tuple
992- contains only one non-empty string generated within the maximum limit
993- ``max_pairs``.
1030+ contains only one non-empty variable name, then it generates all the pairs
1031+ containing it (within the limit ``max_pairs``) .
9941032 all_possible_pairs : bool, default ``True``
9951033 If ``True`` tries to create all possible pairs within the limit ``max_pairs``.
9961034 The pairs and variables given in ``specific_pairs`` have priority.
0 commit comments