Commit 620b8a59 authored by Joaquin Torres's avatar Joaquin Torres

Corrected hyperparam_tuning metric computation

parent 5b97dbfb
...@@ -73,13 +73,13 @@ if __name__ == "__main__": ...@@ -73,13 +73,13 @@ if __name__ == "__main__":
# -------------------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------------------
# 1. No class weight # 1. No class weight
models_simple = {"DT" : DecisionTreeClassifier(), models_simple = {"DT" : DecisionTreeClassifier(),
# "RF" : RandomForestClassifier(), "RF" : RandomForestClassifier(),
# "Bagging" : BaggingClassifier(), "Bagging" : BaggingClassifier(),
# "AB" : AdaBoostClassifier(algorithm='SAMME'), "AB" : AdaBoostClassifier(algorithm='SAMME'),
# "XGB": XGBClassifier(), "XGB": XGBClassifier(),
# "LR" : LogisticRegression(max_iter=1000), "LR" : LogisticRegression(max_iter=1000),
# "SVM" : SVC(probability=True, max_iter=1000), "SVM" : SVC(probability=True, max_iter=1000),
# "MLP" : MLPClassifier(max_iter=500) "MLP" : MLPClassifier(max_iter=500)
# "ElNet" : LogisticRegression(max_iter=1000, penalty='elasticnet') # "ElNet" : LogisticRegression(max_iter=1000, penalty='elasticnet')
} }
...@@ -141,8 +141,8 @@ if __name__ == "__main__": ...@@ -141,8 +141,8 @@ if __name__ == "__main__":
# -------------------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------------------
# Store each df as a sheet in an excel file # Store each df as a sheet in an excel file
sheets_dict = {} sheets_dict = {}
for i, group in enumerate(['pre']): #['pre', 'post'] for i, group in enumerate(['pre', 'post']):
for j, method in enumerate(['under_']): #['', '', 'over_', 'under_'] for j, method in enumerate(['', '', 'over_', 'under_']):
# Get dataset based on group and method # Get dataset based on group and method
X = data_dic['X_train_' + method + group] X = data_dic['X_train_' + method + group]
y = data_dic['y_train_' + method + group] y = data_dic['y_train_' + method + group]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment