|
| 1 | +import matplotlib.pyplot as plt |
| 2 | + |
| 3 | +plt.style.use("seaborn") |
| 4 | + |
| 5 | +n_estimators = [2, 5, 7, 10] |
| 6 | +fusion = [77.14, 76.81, 76.52, 76.06] |
| 7 | +voting = [78.04, 79.39, 79.63, 79.78] |
| 8 | +bagging = [77.21, 78.94, 79.09, 79.47] |
| 9 | +snapshot_ensemble = [77.30, 77.39, 77.91, 77.58] |
| 10 | + |
| 11 | +plt.plot(n_estimators, fusion, label="fusion", linewidth=5) |
| 12 | +plt.plot(n_estimators, voting, label="voting", linewidth=5) |
| 13 | +plt.plot(n_estimators, bagging, label="bagging", linewidth=5) |
| 14 | +plt.plot(n_estimators, snapshot_ensemble, label="snapshot ensemble", linewidth=5) |
| 15 | + |
| 16 | +plt.title("ResNet@CIFAR-100", fontdict={"size": 30}) |
| 17 | +plt.xlabel("n_estimators", fontdict={"size": 30}) |
| 18 | +plt.ylabel("testing acc", fontdict={"size": 30}) |
| 19 | +plt.xticks(n_estimators, fontsize=25) |
| 20 | +plt.yticks(fontsize=25) |
| 21 | +plt.legend(prop={"size": 30}) |
0 commit comments