绘制AUC ROC 曲线 计算混淆矩阵
准确率召回率曲线,曲线下面积等是机器学习中常用来检验模型的标准,话不多说,直接上代码。
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 10 23:36:57 2020
@author: dell
"""
import h5py
import numpy as np
import matplotlib.pyplot as plt
from keras.models import load_model
from sklearn import svm, datasets
from sklearn.metrics import roc_curve, auc, confusion_matrix ###计算roc和auc 混淆矩阵
from sklearn import model_selection
# import mglearn
def load_data():
test_data_path = r"C:\Users\dell\Desktop\data\test_data_normalized.nc"
with h5py.File( test_data_path, mode = 'r')