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

Function test_linear_model

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

Source from the content-addressed store, hash-verified

41
42
43def test_linear_model():
44 model = LogisticRegression(lr=0.01, max_iters=500, penalty="l1", C=0.01)
45 model.fit(X_train, y_train)
46 predictions = model.predict(X_test)
47 assert roc_auc_score(y_test, predictions) >= 0.95
48
49
50def test_random_forest():

Callers

nothing calls this directly

Calls 3

LogisticRegressionClass · 0.90
fitMethod · 0.45
predictMethod · 0.45

Tested by

no test coverage detected