Issue
for model in models:
model_name = model.__class__.__name__
accuracies = cross_val_score(model, X_res_train, y_res_train, scoring='accuracy', cv=CV)
for fold_idx, accuracy in enumerate(accuracies):
entries.append((model_name, fold_idx, accuracy))
Solution
Its the index number of the row in 'accuracies'
For example if you have this
df = pd.DataFrame({'Marca temporal':[1,2,3,3,4,5,6,7], 'Temperatura':[37,84,55, 60,61,72,36,94]})
accuracies = df["Temperatura"]
for fold_idx, accuracy in enumerate(accuracies):
print(fold_idx, accuracy)
You can notice it prints the index of each item, and then the item itself
Answered By - Kirsten_J
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.