Answered step by step
Verified Expert Solution
Question
1 Approved Answer
fig, ax = plt.subplots() y_true, y_pred = zip(*results) cnf_matrix = confusion_matrix(y_true, y_pred) np.set_printoptions(precision=2) cnf_matrix = cnf_matrix.astype('float') / cnf_matrix.sum(axis=1)[:,np.newaxis] fig, ax = plt.subplots() im = ax.imshow(cnf_matrix,
fig, ax = plt.subplots() y_true, y_pred = zip(*results) cnf_matrix = confusion_matrix(y_true, y_pred) np.set_printoptions(precision=2) cnf_matrix = cnf_matrix.astype('float') / cnf_matrix.sum(axis=1)[:,np.newaxis] fig, ax = plt.subplots() im = ax.imshow(cnf_matrix, interpolation='nearest', cmap=plt.cm.Blues) ax.figure.colorbar(im, ax=ax) ax.grid(False)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started