0 0 votes I have the code below, outputting the accuracy. How can I output the F1-score instead? Thanks in advance, clf.fit(data_train,target_train) preds = clf.predict(data_test) # accuracy for the current fold only r2score = clf.score(data_test,target_test) Python machine-learning f1score accuracy + – 0% Accept Rate Accepted 0 answers out of 1 questions psil 120 points 1 1 3 answer comment Share 0 reply Please log in or register to add a comment.
0 0 votes from sklearn.metrics import f1_score f1_score(data_test,target_test) tofighi answered Apr 2, 2022 tofighi 116k points 73 79 101 comment Share 0 reply Please log in or register to add a comment.