|
| 1 | +import matplotlib.pyplot as plt |
| 2 | + |
| 3 | +plt.style.use("seaborn") |
| 4 | + |
| 5 | +n_estimators = [5, 10, 15, 20] |
| 6 | +fusion = [78.26, 78.79, 78.44, 77.20] |
| 7 | +voting = [77.71, 78.22, 78.13, 78.73] |
| 8 | +bagging = [77.15, 77.32, 77.52, 77.85] |
| 9 | +gradient_boosting = [77.28, 78.88, 79.19, 78.60] |
| 10 | +snapshot_ensemble = [70.83, 70.69, 70.06, 70.37] |
| 11 | + |
| 12 | +plt.plot(n_estimators, fusion, label="fusion", linewidth=5) |
| 13 | +plt.plot(n_estimators, voting, label="voting", linewidth=5) |
| 14 | +plt.plot(n_estimators, bagging, label="bagging", linewidth=5) |
| 15 | +plt.plot(n_estimators, gradient_boosting, label="gradient boosting", linewidth=5) |
| 16 | +plt.plot(n_estimators, snapshot_ensemble, label="snapshot ensemble", linewidth=5) |
| 17 | + |
| 18 | +plt.title("LeNet@CIFAR-10", fontdict={"size": 30}) |
| 19 | +plt.xlabel("n_estimators", fontdict={"size": 30}) |
| 20 | +plt.ylabel("testing acc", fontdict={"size": 30}) |
| 21 | +plt.xticks(n_estimators, fontsize=25) |
| 22 | +plt.yticks(fontsize=25) |
| 23 | +plt.legend(prop={"size": 30}) |
0 commit comments