Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

access to numbers in classification_report - sklearn

# you can use this instead
from sklearn.metrics import precision_recall_fscore_support as score
y_true = [0, 1, 2, 2, 2]
y_pred = [0, 0, 2, 2, 1]
precision,recall,fscore,support=score(y_true,y_pred,average='macro')
print 'Precision : {}'.format(precision)
print 'Recall    : {}'.format(recall)
print 'F-score   : {}'.format(fscore)
print 'Support   : {}'.format(support)
Comment

PREVIOUS NEXT
Code Example
Python :: change py version in colab 
Python :: square (n) sum 
Python :: call parent function init python 
Python :: how to read a json resposnse from a link in python 
Python :: opencv flip image 
Python :: identity matrix in python 
Python :: heatmap(df_train.corr()) 
Python :: no module named pyplot 
Python :: easy sending email python 
Python :: set seed python 
Python :: calculate highest frequency or mode in pandas dataframe 
Python :: fake user agent python 
Python :: python mouse click 
Python :: pyplot set x range 
Python :: discord command addrole python 
Python :: difference between two dates in days python 
Python :: mape python 
Python :: serving static audio files with flask in react 
Python :: print every element in list python outside string 
Python :: worksheet merge&center cells python 
Python :: python tkinter lable on bottom of screen 
Python :: matplotlib transparency 
Python :: uninstall python from mac 
Python :: xpath helium 
Python :: python find second occurrence in string 
Python :: is int python 
Python :: python dynamic loop 
Python :: python get average list in 2d array 
Python :: resource wordnet not found python 
Python :: how to split a string from the beginning to a specific character in python 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =