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

Method _loss

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

Source from the content-addressed store, hash-verified

126 self.cost_func = binary_crossentropy
127
128 def _loss(self, w):
129 loss = self.cost_func(self.y, self.sigmoid(np.dot(self.X, w)))
130 return self._add_penalty(loss, w)
131
132 @staticmethod
133 def sigmoid(x):

Callers

nothing calls this directly

Calls 2

sigmoidMethod · 0.95
_add_penaltyMethod · 0.80

Tested by

no test coverage detected