Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plot roc curve for neural network keras

from sklearn.metrics import roc_curve, auc

history = model.fit(x_train, y_train, validation_data=(
        x_test, y_test), epochs=num_of_epochs, batch_size=batch_size, verbose=1)

y_pred = model.predict(x_test).ravel()

nn_fpr_keras, nn_tpr_keras, nn_thresholds_keras = roc_curve(y_test, y_pred)
auc_keras = auc(nn_fpr_keras, nn_tpr_keras)
plt.plot(nn_fpr_keras, nn_tpr_keras, marker='.', label='Neural Network (auc = %0.3f)' % auc_keras)

Comment

PREVIOUS NEXT
Code Example
Python :: how to import csv in pandas 
Python :: pandas add suffix to column names 
Python :: pip code for pytube 
Python :: numpy install 
Python :: export pandas dataframe as excel 
Python :: python pip install jinja 
Python :: clearing all text from a file in python 
Python :: python - convert a column in a dataframe into a list 
Python :: how to delete na values in a dataframe 
Python :: pandas convert index to column 
Python :: python: change column name 
Python :: how ot split a string every fourth eter 
Python :: max of two columns pandas 
Python :: tick labels vertical matplotlib 
Python :: python distance between coordinates 
Python :: set axis title matplotlib 
Python :: python check if a variable is an pandaDataframe 
Python :: python pyodbc install 
Python :: install googlesearch for python 
Python :: check if image is empty opencv python 
Python :: create new django app 
Python :: pip vs anaconda venv 
Python :: python how to find the highest number in a dictionary 
Python :: favicon django 
Python :: python print float in scientific notation 
Python :: python runtime 
Python :: how to check opencv version using python 
Python :: python dns pip 
Python :: dropdown in tkinter 
Python :: how to set a image as background in tkitner 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =