diff --git a/cases/credit_scoring/le_exp.py b/cases/credit_scoring/le_exp.py index 0dd3a23603..efe78c9749 100644 --- a/cases/credit_scoring/le_exp.py +++ b/cases/credit_scoring/le_exp.py @@ -1,4 +1,5 @@ import logging +from datetime import datetime from sklearn.metrics import roc_auc_score as roc_auc from sklearn.preprocessing import LabelEncoder @@ -30,7 +31,6 @@ def run_problem(timeout: float = 5.0, full_path_train = fedot_project_root().joinpath(file_path_train) data = InputData.from_csv(full_path_train, task='classification', target_columns='class') - target = data.target encoded = LabelEncoder().fit_transform(target) data.target = encoded @@ -43,10 +43,15 @@ def run_problem(timeout: float = 5.0, metric='f1', **composer_args) if model_type != "auto": + start_time = datetime.now() automl.fit(train, predefined_model=model_type) + end_time = datetime.now() + print(end_time - start_time) + print(train.features.shape) else: automl.fit(train) + automl.predict(test) metrics = automl.get_metrics() @@ -66,7 +71,7 @@ def run_problem(timeout: float = 5.0, set_random_seed(42) Consts.USE_LABEL_ENC_AS_DEFAULT = True - + print('Labelenc') run_problem(timeout=1, visualization=False, with_tuning=False, model_type='logit') @@ -75,20 +80,22 @@ def run_problem(timeout: float = 5.0, visualization=False, with_tuning=False, model_type='xgboost') - run_problem(timeout=10, - visualization=True, - with_tuning=True, model_type='auto') + # run_problem(timeout=10, + # visualization=True, + # with_tuning=True, model_type='auto') + + print('OH etc') Consts.USE_LABEL_ENC_AS_DEFAULT = False run_problem(timeout=1, - visualization=True, + visualization=False, with_tuning=True, model_type='logit') run_problem(timeout=1, visualization=False, with_tuning=False, model_type='xgboost') - run_problem(timeout=10, - visualization=True, - with_tuning=True, model_type='auto') + # run_problem(timeout=10, + # visualization=True, + # with_tuning=True, model_type='auto')