Created
September 23, 2018 19:47
-
-
Save prratek/406b67cf34e6fca96f311ce28d07691e to your computer and use it in GitHub Desktop.
Increase in R^2 as we increase n_estimators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import metrics | |
preds = np.stack([t.predict(X_valid) for t in m.estimators_]) | |
preds[:,0], np.mean(preds[:,0]) | |
plt.plot([metrics.r2_score(y_valid, np.mean(preds[:i+1], axis=0)) for i in range(10)]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment