7a7d0e7b35cbee6b3409ac30ff4bf4edfe525af2,alphapy/plots.py,,plot_confusion_matrix,#Any#Any#,593
Before Change
cmn = cm.astype("float") / cm.sum(axis=1)[:, np.newaxis]
// place text in square of confusion matrix
thresh = (cm.max() + cm.min()) / 2.0
for i, j in product(list(range(cm.shape[0])), list(range(cm.shape[1]))):
cmr = round(cmn[i, j], 3)
plt.text(j, i, cmr,
horizontalalignment="center",
color="white" if cm[i, j] > thresh else "black")
// labels
plt.tight_layout()
plt.ylabel("True Label")
plt.xlabel("Predicted Label")
// save the chart
After Change
color="white" if cm[i, j] > thresh else "black")
// show the color bar
im = ax.imshow(cm, interpolation="nearest", cmap=cmap)
ax.figure.colorbar(im, ax=ax)
// save the chart
tag = USEP.join([pstring, algo])
write_plot("matplotlib", plt, "confusion", tag, plot_dir)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: ScottfreeLLC/AlphaPy
Commit Name: 7a7d0e7b35cbee6b3409ac30ff4bf4edfe525af2
Time: 2019-11-17
Author: Mark.R.Conway@gmail.com
File Name: alphapy/plots.py
Class Name:
Method Name: plot_confusion_matrix
Project Name: matplotlib/matplotlib
Commit Name: d1ae68571b20c86eda94f74dc035b5c22cc8e5bd
Time: 2018-09-02
Author: 2836374+timhoffm@users.noreply.github.com
File Name: examples/axes_grid1/demo_axes_grid.py
Class Name:
Method Name: demo_grid_with_each_cbar
Project Name: matplotlib/matplotlib
Commit Name: d1ae68571b20c86eda94f74dc035b5c22cc8e5bd
Time: 2018-09-02
Author: 2836374+timhoffm@users.noreply.github.com
File Name: examples/axes_grid1/demo_axes_grid.py
Class Name:
Method Name: demo_grid_with_each_cbar_labelled