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

Function test_linear

mla/tests/test_regression_accuracy.py:30–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29
30def test_linear():
31 model = LinearRegression(lr=0.01, max_iters=2000, penalty="l2", C=0.003)
32 model.fit(X_train, y_train)
33 predictions = model.predict(X_test)
34 assert mean_squared_error(y_test, predictions) < 0.25
35
36
37def test_mlp():

Callers

nothing calls this directly

Calls 4

LinearRegressionClass · 0.90
mean_squared_errorFunction · 0.90
fitMethod · 0.45
predictMethod · 0.45

Tested by

no test coverage detected