Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def plot_matrix(m):
- fig = plt.figure(figsize=m.shape)
- ax = fig.add_subplot(111)
- cax = ax.matshow(m)
- fig.colorbar(cax)
- for f in range(len(misclassified)):
- label = y_test[misclassified[f]]
- if len(seen) <= 10 and label not in seen:
- seen+=label
- item = X_train.iloc[misclassified[f]].values.reshape(28, 28)
- plot_matrix(item)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement