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

Method _loss

mla/linear_models.py:114–116  ·  view source on GitHub ↗
(self, w)

Source from the content-addressed store, hash-verified

112 """Linear regression with gradient descent optimizer."""
113
114 def _loss(self, w):
115 loss = self.cost_func(self.y, np.dot(self.X, w))
116 return self._add_penalty(loss, w)
117
118 def init_cost(self):
119 self.cost_func = mean_squared_error

Callers

nothing calls this directly

Calls 1

_add_penaltyMethod · 0.80

Tested by

no test coverage detected