Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

recall calculate confusion matrix .ravel()

# tn = True Negative
# fp = False Positive
# fn = False Negative
# tp = True Positive

tn, fp, fn, tp = confusion_matrix(y_test,y_pred).ravel()

#Specificity
specificity = tn/(tn+fp)

# Recall
recall = tp/(tp+fn)
Comment

PREVIOUS NEXT
Code Example
Python :: python youtube downloader (Downloading multiple videos) 
Python :: facet grid, barplot, catplot 
Python :: how to console log in django heroku 
Python :: Python - How To Convert String to ASCII Value 
Python :: django.core.exceptions.ImproperlyConfigured: Field name is not valid for model 
Python :: replace NaN value in pandas data frame 
Python :: python list of possible paths 
Python :: python aus liste tuple machen 
Python :: how to count the iteration a list python 
Python :: python string: index error 
Python :: using pandas stack and subset to return a dataframe object of highly correated pairs 
Python :: Add one to a column pands 
Python :: Multiple page UI within same window UI PyQt 
Python :: airflow set ui color of operator ui_color 
Python :: pycountry get 
Python :: matplotlib smooth loss curves 
Python :: Remove all duplicates words from a given sentence 
Python :: python multiply numbers nested list 
Python :: python source script custom functions 
Python :: pip_install_packages2.bat 
Python :: 144/360 
Python :: how to put quotes in string python 
Python :: np random choice given distribution 
Python :: yaml documentation 
Python :: Are angles of a parallelogram equal? 
Python :: convert month weeks days into month days in python pandas 
Python :: rotch randn 
Python :: remove repetitive characters from the specified column of a given DataFrame 
Python :: jupyter_ascending 
Python :: boolean indexing datetime object | converting string to datetime object 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =