MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / _cost

Method _cost

mla/linear_models.py:60–63  ·  view source on GitHub ↗
(self, X, y, theta)

Source from the content-addressed store, hash-verified

58 return loss
59
60 def _cost(self, X, y, theta):
61 prediction = X.dot(theta)
62 error = self.cost_func(y, prediction)
63 return error
64
65 def fit(self, X, y=None):
66 self._setup_input(X, y)

Callers 1

_gradient_descentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected