SG++-Doxygen-Documentation
sgpp::solver::ElasticNetFunction Class Reference

The ElasticNetFunction class. More...

#include <ElasticNetFunction.hpp>

Inheritance diagram for sgpp::solver::ElasticNetFunction:
sgpp::solver::RegularizationFunction

Public Member Functions

 ElasticNetFunction (double lambda, double l1Ratio)
 ElasticNetFunction. More...
 
double eval (sgpp::base::DataVector weights) override
 eval evaluates the regularization function for weights. More...
 
base::DataVector prox (const sgpp::base::DataVector &weights, double stepsize) override
 prox evaluates the proximal operator for the function for weights. More...
 

Detailed Description

The ElasticNetFunction class.

Corresponds to the regularization functional \( \left(1 - \gamma \right) \Vert \boldsymbol{\alpha} \Vert_2 + \gamma \Vert \boldsymbol{\alpha} \Vert _1 \).

Constructor & Destructor Documentation

◆ ElasticNetFunction()

sgpp::solver::ElasticNetFunction::ElasticNetFunction ( double  lambda,
double  l1Ratio 
)
inline

ElasticNetFunction.

Parameters
lambdacontrols the regularization strength.
l1Ratio(called \( \gamma \) above) controls the amount of \( l_1 \) regularization. A value of one corresponds to the lasso, and a value of zero to the ridge regularization.

Member Function Documentation

◆ eval()

double sgpp::solver::ElasticNetFunction::eval ( sgpp::base::DataVector  weights)
inlineoverridevirtual

eval evaluates the regularization function for weights.

Parameters
weights

Implements sgpp::solver::RegularizationFunction.

References sgpp::base::DataVector::getSize(), and python.statsfileInfo::i.

◆ prox()

base::DataVector sgpp::solver::ElasticNetFunction::prox ( const sgpp::base::DataVector weights,
double  stepsize 
)
inlineoverridevirtual

prox evaluates the proximal operator for the function for weights.

Parameters
weights
stepsizeis the stepsize used for the proximal step

Implements sgpp::solver::RegularizationFunction.

References sgpp::base::DataVector::mult(), and sgpp::solver::LassoFunction::prox().


The documentation for this class was generated from the following file: