Demo entry 6624157

rf_class

   

Submitted by anonymous on Jun 13, 2017 at 21:10
Language: Python. Code size: 540 Bytes.

rf_tuned = RandomForestClassifier(n_estimators=10, max_features=10,
                                  max_depth=5, criterion='entropy',
                                  bootstrap=True, random_state=221)
rf_tuned.fit(Xb_train, yb_train)
res_tuned = rf_tuned.predict(Xb_test)
print classification_report(yb_test, res_tuned)
print accuracy_score(yb_test, res_tuned)
 
cv = StratifiedShuffleSplit(n_splits=4, test_size=0.2, random_state=10)
learning_curve_model(Xb_train, yb_train, rf_tuned, cv, np.linspace(0.1, 1.0, 10))
plt.show()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).