MCPcopy Index your code
hub / github.com/rushter/MLAlgorithms / test_random_forest

Function test_random_forest

mla/tests/test_classification_accuracy.py:50–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49
50def test_random_forest():
51 model = RandomForestClassifier(n_estimators=10, max_depth=4)
52 model.fit(X_train, y_train)
53 predictions = model.predict(X_test)[:, 1]
54 assert roc_auc_score(y_test, predictions) >= 0.95
55
56
57def test_svm_classification():

Callers

nothing calls this directly

Calls 3

fitMethod · 0.45
predictMethod · 0.45

Tested by

no test coverage detected