Linear combination of L1 and L2 penalties.
| 29 | |
| 30 | |
| 31 | class ElasticNet(Regularizer): |
| 32 | """Linear combination of L1 and L2 penalties.""" |
| 33 | |
| 34 | def _penalty(self, weights): |
| 35 | return 0.5 * self.C * weights**2 + (1.0 - self.C) * np.abs(weights) |
nothing calls this directly
no outgoing calls
no test coverage detected