MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / get_mse

Function get_mse

linear_regression_class/overfitting.py:50–52  ·  view source on GitHub ↗
(Y, Yhat)

Source from the content-addressed store, hash-verified

48
49
50def get_mse(Y, Yhat):
51 d = Y - Yhat
52 return d.dot(d) / len(d)
53
54
55def plot_train_vs_test_curves(X, Y, sample=20, max_deg=20):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected