Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

extract numbers from sklearn classification_report

# 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 :: list existing virtual envs 
Python :: check column type pandas 
Python :: require http method django view 
Python :: cv2 resize 
Python :: random int in python 3 
Python :: how to print whole year calendar in python 
Python :: python clear screen 
Python :: set axis ticks matplotlib 
Python :: python drop rows with two conditions 
Python :: pairplot size 
Python :: python implode list 
Python :: Solving environment: failed with initial frozen solve. retrying with flexible solve 
Python :: pandas not is in 
Python :: format numbers in dataframe pandas 
Python :: django related_name abstract class 
Python :: python get domain from url 
Python :: python show image opencv 
Python :: python convert xd8 to utf8 
Python :: how to print the text of varying length in python 
Python :: arweave python 
Python :: python join list with comma 
Python :: virtual env in mac 
Python :: how to traverse a linked list in python 
Python :: how to set bgcolor of a widget in pyqt5 
Python :: anaconda create new environment 
Python :: how to change python version on linux 
Python :: Python program that takes 2 words as input from the user and prints out a list containing the letters that the 2 words have in common 
Python :: create numpy table with random values in range 
Python :: renpy scene vs show 
Python :: copy a 2d array in python 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =