secure_learning.models.secure_elastic_nets module¶
Implementation of ElasticNets regression model.
- class secure_learning.models.secure_elastic_nets.ElasticNets(solver_type=SolverTypes.GD, alpha1=1, alpha2=1)[source]¶
Bases:
Linear
Solver for Elastic Nets regression. Optimizes a model with objective function: $$frac{1}{2{n}_{textrm{samples}}} times ||y - X_times_w||^2_2 + alpha_1 ||w||_1 + frac{alpha_2 ||w||^2_2}{2}$$
- __init__(solver_type=SolverTypes.GD, alpha1=1, alpha2=1)[source]¶
Constructor method.
- Parameters:
solver_type (
SolverTypes
) – Solver type to use (e.g. Gradient Descent aka GD)alpha1 (
float
) – Regularisation parameter for L2alpha2 (
float
) – Regularisation parameter for L2
- name = 'Elastic nets regression'¶