Question: i have defined a function called scores to calculate the F 1 score, Precision, Recall and how to write a code to generate the Sensitivity

i have defined a function called scores to calculate the F1 score, Precision, Recall and how to write a code to generate the Sensitivity and Specificity when my input is 5*5 or 6*6 matrix def scores(cm):
p={}
r={}
f1={}
for i in range( len(cm) :
p[i]=cmi,i??(cm[:,i])
r[i]=cmi,i??(cm[i,:])
f1[i]=2**(cmi,i??(cm[:,i]))**cmi,i??(cm[i,:])(cmi,i??(cm[:,i]))+(cmi,i??(cm[i,:]))
return p,r,f1and put the codes in the function scores
 i have defined a function called scores to calculate the F1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!