diff --git a/modules/util/plot_cm.py b/modules/util/plot_cm.py index 64cfebe37dafb6761db3fac95a064c202f5b7398..7e5c2a1d02ff34f22cd49b48b3e73b3b8116f052 100644 --- a/modules/util/plot_cm.py +++ b/modules/util/plot_cm.py @@ -32,14 +32,16 @@ def plot_confusion_matrix(cm, labels, title='Confusion matrix', filename = 'conf ''' if normalize: - cm = cm.astype('float')*10 / cm.sum(axis=1)[:, np.newaxis] + cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis] + cm *= 100 cm = np.nan_to_num(cm, copy=True) cm = cm.astype('int') np.set_printoptions(precision=2) fig = plt.figure(figsize=(3, 3), dpi=320, facecolor='w', edgecolor='k') ax = fig.add_subplot(1, 1, 1) - im = ax.imshow(cm, cmap='Oranges') + # im = ax.imshow(cm, cmap='Oranges') + im = ax.imshow(cm, cmap='Blues') classes = [re.sub(r'([a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))', r'\1 ', x) for x in labels] classes = ['\n'.join(wrap(l, 40)) for l in classes]