Commit f46141b5 authored by Joaquin Torres's avatar Joaquin Torres

Trying to solve the mean PR curve issue

parent a0715f90
......@@ -190,8 +190,8 @@ if __name__ == "__main__":
# Metric generation through cv for tuned models3
# --------------------------------------------------------------------------------------------------------
scores_sheets = {} # To store score dfs as sheets in the same excel file
for i, group in enumerate(['pre', 'post']):
for j, method in enumerate(['', '', 'over_', 'under_']):
for i, group in enumerate(['post']): # ['pre', 'post']
for j, method in enumerate(['']): # ['', '', 'over_', 'under_']
# Get train dataset based on group and method
X_train = data_dic['X_train_' + method + group]
y_train = data_dic['y_train_' + method + group]
......@@ -217,7 +217,7 @@ if __name__ == "__main__":
# Manually loop through each fold in the cross-validation
for fold_idx, (train_idx, test_idx) in enumerate(cv.split(X_train, y_train)):
X_train_fold, X_test_fold = X_train[train_idx], X_train[test_idx]
y_train_fold, y_test_fold = y_train[train_idx], y[test_idx]
y_train_fold, y_test_fold = y_train[train_idx], y_train[test_idx]
# Fit the model on the training data
model.fit(X_train_fold, y_train_fold)
# --------------------- SCORINGS ---------------------------
......
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