""" Creazione della ROC Curve"""
from sklearn.metrics import roc_curve
from sklearn.metrics import auc
import matplotlib.pyplot as plt

# Funzione che plotta la ROC Curve
def create_roc_curve1(trainedclassifier,test_set,test_set_labels):
    predizioni1 = trainedclassifier.predict_proba(test_set)
    fpr, tpr, thresholds = roc_curve(test_set_labels, predizioni1[:, 1])
    roc_auc = auc(fpr, tpr)
    print("Area under the ROC curve : %f" % roc_auc)
    plt.figure(1)
    plt.title('Receiver Operating Characteristic')
    plt.plot(fpr, tpr, 'b', label='AUC = %0.2f' % roc_auc)
    plt.legend(loc='lower right')
    plt.plot([0, 1], [0, 1], 'r--')
    plt.xlim([0, 1])
    plt.ylim([0, 1])
    plt.ylabel('True Positive Rate')
    plt.xlabel('False Positive Rate')
    plt.show()