Exemple #1
0
 def check_learning_curve_settings():
     if 'learning_curve_model' not in GS:
         raise utils.InvalidConfParameters("You enabled data_learning_curve plots but you did"
                                           "not specify learning_curve_model in [GeneralSetup]")
     if 'learning_curve_score' not in GS:
         raise utils.InvalidConfParameters("You enabled data_learning_curve plots but you did"
                                           "not specify learning_curve_score in [GeneralSetup]")
Exemple #2
0
 def check_and_boolify_plot_settings():
     default_false = [
         'plot_each_feature_vs_target', 'rf_error_method',
         'rf_error_percentile', 'normalize_target_feature'
     ]
     default_true = [
         'plot_target_histogram', 'plot_train_test_plots',
         'plot_predicted_vs_true', 'plot_error_plots',
         'plot_predicted_vs_true_average', 'plot_best_worst_per_point'
     ]
     all_settings = default_false + default_true
     if 'MiscSettings' not in conf:
         conf['MiscSettings'] = dict()
     MS = conf['MiscSettings']
     for name, value in MS.items():
         if name not in all_settings:
             raise utils.InvalidConfParameters(
                 f"[MiscSettings] parameter '{name}' is unknown")
         try:
             MS[name] = mybool(value)
         except ValueError:
             pass
         #    raise utils.InvalidConfParameters(
         #        f"[PlotSettings] parameter '{name}' must be a boolean")
     for name in default_false:
         if name not in MS:
             MS[name] = False
     for name in default_true:
         if name not in MS:
             MS[name] = True
Exemple #3
0
 def check_general_setup_settings_are_valid():
     all_settings =  ['input_features', 'target_feature', 'metrics',
                      'randomizer', 'validation_columns', 'not_input_features', 'grouping_feature']
     for name in GS:
         if name not in all_settings:
             raise utils.InvalidConfParameters(
                     f"[GeneralSetup] contains unknown setting {name}.\n"
                     f"Valid GeneralSetup options are: {all_settings}")
Exemple #4
0
 def check_and_boolify_plot_settings():
     default_false = ['feature_vs_target', 'error_plots', 'average_error_plots']
     default_true = ['target_histogram', 'train_test_plots', 'predicted_vs_true',
                      'predicted_vs_true_bars', 'best_worst_per_point']
     all_settings = default_false + default_true
     if 'PlotSettings' not in conf:
         conf['PlotSettings'] = dict()
     PS = conf['PlotSettings']
     for name, value in PS.items():
         if name not in all_settings:
             raise utils.InvalidConfParameters(f"[PlotSettings] parameter '{name}' is unknown")
         try:
             PS[name] = mybool(value)
         except ValueError:
             raise utils.InvalidConfParameters(
                 f"[PlotSettings] parameter '{name}' must be a boolean")
     for name in default_false:
         if name not in PS:
             PS[name] = False
     for name in default_true:
         if name not in PS:
             PS[name] = True