mlpack  git-master

Approximate a vector with another vector on lp ball. More...

Static Public Member Functions

static void ProjectToL0Ball (arma::vec &v, int tau)
 Project the vector onto the l0 ball with norm tau. More...

 
static void ProjectToL1Ball (arma::vec &v, double tau)
 Project the vector onto the l1 ball with norm tau. More...

 

Detailed Description

Approximate a vector with another vector on lp ball.

Currently support l0 ball and l1 ball with specific norm. It can be used in projected gradient method.

Definition at line 27 of file proximal.hpp.

Member Function Documentation

◆ ProjectToL0Ball()

static void ProjectToL0Ball ( arma::vec &  v,
int  tau 
)
static

Project the vector onto the l0 ball with norm tau.

That is, we try to approximate v with sparse vector w:

\[ w = argmin_w ||w - v||_2, \qquad s.t. ~ ||w||_0 \leqslant tau \]

Parameters
vInput vector to be approxmated, the output optimal vector is also saved in v.
tauNorm of l0 ball.

◆ ProjectToL1Ball()

static void ProjectToL1Ball ( arma::vec &  v,
double  tau 
)
static

Project the vector onto the l1 ball with norm tau.

That is, we will solve for:

\[ w = argmin_w ||w - v||_2, \qquad s.t. ~ ||w||_1 \leqslant tau \]

Parameters
vInput vector to be approxmated, the output optimal vector is also saved in v.
tauNorm of l1 ball.

Referenced by Atoms::ProjectedGradientEnhancement().


The documentation for this class was generated from the following file:
  • /var/www/www.mlpack.org/mlpack-git/src/mlpack/core/optimizers/proximal/proximal.hpp