Question: Write a function that takes a confusion matrix as input and returns index of the class with the maximum f1 score. def max_f1_score(cm): Inputs:
Write a function that takes a confusion matrix as input and returns index of the class with the maximum f1 score.
def max_f1_score(cm):
"""
Inputs:
cm : confusion matrix, 2-d numpy array
Outputs:
integer, index of class with max f1 score
"""
### Write your code here
Step by Step Solution
3.49 Rating (149 Votes )
There are 3 Steps involved in it
Python code import numpy function to find the max score def maxf1scorecm finding number of rows and ... View full answer
Get step-by-step solutions from verified subject matter experts
