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

Class LinearRegression

mla/linear_models.py:111–119  ·  view source on GitHub ↗

Linear regression with gradient descent optimizer.

Source from the content-addressed store, hash-verified

109
110
111class LinearRegression(BasicRegression):
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
120
121
122class LogisticRegression(BasicRegression):

Callers 2

test_linearFunction · 0.90
regressionFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_linearFunction · 0.72