#-*- coding: utf-8 -*-
# pylint: disable=E1101
from random import shuffle
import matplotlib.pyplot as plt
import pandas as pd
from keras.layers.core import Activation, Dense
from keras.models import Sequential
from scipy.interpolate import lagrange
from sklearn.externals import joblib
from sklearn.metrics import confusion_matrix, roc_curve
from sklearn.tree import DecisionTreeClassifier
"""
cm_plot--> Custom confusion matrix visualization
programmer_1--> Use Lagrange interpolation to interpolate
programmer_2--> structure CART Decision tree model , Make predictions and give training results , And draw ROC curve
programmer_3--> Use neural network model , Make predictions and give training results , And draw ROC curve
"""
def cm_plot(y, yp):
cm = confusion_matrix(y, yp)
plt.matshow(cm, cmap=plt.cm.Greens)
plt.colorbar()
for x in range(len(cm)):
for y in range(len(cm)):
plt.annotate(
cm[x, y],
xy=(x, y),
horizontalalignment='center',
verticalalig