I am trying to classify some models in a binary classification. I want to classify the models with respect of score and f2 score.
For the 'score' I used the code
for name, clf in zip(models, classifiers):
clf.fit(X_train, y_train)
score = clf.score(X_test, y_test)
scores.append(score)
Which gives the scores of all the models, but I am not able to do it find the f2 score of all the models. Can anyone suggest what should be the code?