NDOSolver / FiOracle
Interfaces and Solvers for NonDifferentiable Optimization
|
#include <PrimalDual.h>
Public Member Functions | |
PrimalDual (SubGrad *slvr, istream *iStrm=0) | |
void | SetVOLLog (ostream *outs=0, const char lvl=0) |
void | Format (void) |
void | NewDEF (void) |
void | NewStep (void) |
HpNum | GetDFLCoeff (void) |
HpNum | GetStepsize (bool StepIsIncr=false) |
HpNum | GetLev (void) |
HpNum | GetBeta (void) |
void | SetMaxBeta (const HpNum alpha) |
![]() | |
Deflection (SubGrad *slvr) | |
virtual void | SetVOLLog (std::ostream *outs=0, const char lvl=0) |
virtual bool | DoSS (void) |
virtual HpNum | Delta (void) |
![]() | |
Stepsize (SubGrad *slvr, istream *iStrm=0) | |
virtual void | SetSTPLog (std::ostream *outs=0, const char lvl=0) |
virtual bool | NeedsdkM1Gk (void) |
Private Member Functions | |
void | UpdateGamma (void) |
Private Attributes | |
HpNum | delta |
HpNum | Tmpdelta |
HpNum | vk |
HpNum | StepSize |
HpNum | gamma |
HpNum | beta1 |
bool | average |
HpNum | LipCnst |
Additional Inherited Members | |
![]() | |
FiOracle * | GetOracle (void) |
HpNum | GetStepsize (void) |
HpNum | GetGiNorm (void) |
HpNum | GetDNorm (void) |
HpNum | GetdGk (void) |
HpNum | GetSigma (void) |
HpNum | GetEpsilon (void) |
HpNum | ReadFVal (void) |
![]() | |
virtual bool | UpdateTargetLevel (void) |
HpNum | GetCoeffDefl (void) |
FiOracle * | GetOracle (void) |
HpNum | GetGiNorm (void) |
HpNum | GetDNorm (void) |
HpNum | GetdGk (void) |
HpNum | GetdkM1Gk (void) |
Index | GetNItIcr (void) |
HpNum | ReadFkVal (void) |
HpNum | ReadFiBar (void) |
![]() | |
SubGrad * | Solver |
(pointer to) the SubGrad solver | |
std::ostream * | VOLLog |
the output stream object | |
char | VOLLLvl |
the "level of verbosity" | |
![]() | |
SubGrad * | Solver |
(pointer to) the SubGrad solver | |
std::ostream * | STPLog |
the output stream object | |
char | STPLLvl |
the "level of verbosity" | |
HpNum | FiLev |
the target level \( f^{lev}_i \) | |
HpNum | Beta |
beta factor \( \beta_i \) | |
HpNum | MaxBeta |
maximum value for beta factor | |
HpNum | LpsFct |
scaling factor | |
Definition of the class PrimalDual. This class implements two variants of the Primal-Dual subgradient method (PDSM): simple and weighted averages, under a unified SM scheme. The method has a fixed stability center, and the direction \( d_i \) can be regarded as the average of all the previous weighted subgradients, i.e.:
\[ d_i = ( \sum_{k=1}^i \upsilon_k g_k) / \Delta_i \quad,\quad \Delta_i = \sum_{k=1}^i \upsilon_k \]
It is worth mentioning that the subgradient weights \(\upsilon_k \) can be non-vanishing as \(k\rightarrow \infty\). The stepsize rule (SR) and the deflection rule (DR), respectively, are:
\[ \alpha_i = \upsilon_i / \Delta_i \quad,\quad \nu_i = \Delta_i / \omega_i \]
where \(\omega_i\) is chosen in a suitable way.
|
inline |
Constructor of the class, which derives from both Deflection and Stepsize. Since the constructor of PrimalDual is executed after the one of Stepsize, the following parameters specific for PrimalDual have to be found in the stream after those of the base class Stepsize [see the comments to the constructor of Stepsize]:
For this class, the general parameter LpsFct -defined in Stepsize.h- represents the gamma factor F used to set \(\omega_i\).
|
inlinevirtual |
The method initializes the DR. It does nothing for the base class.
Reimplemented from Deflection.
|
inlinevirtual |
|
inlinevirtual |
Returns the deflection coefficient. This function must be called after NewDEF() [see above].
Implements Deflection.
|
inlinevirtual |
|
inlinevirtual |
This function must be called after NewStep() [see above ] and returns the step value. StepIsIncr controls the stepsize formula in the incremental version.
The base class provides the step value for target stepsize rules, by exploiting \( beta_k \) and \( f^{lev}_k \) computed by NewStep(). While for non-incremental step (StepIsIncr = false) for \( k = 1, 2 , \ldots \) the formula is
\[ \nu_k = \beta_k * ( f_k - f^{lev}_k ) / \| d_k \|^2\,, \]
for incremental step (StepIsIncr = true) for \( k = p(\Pi+1) , \ldots , (p+1)(\Pi+1) - 1 , p = 0, 1 , 2 \ldots \) the stepsize rule is
\[ \nu_k = \beta_k \frac{ f_{ p(\Pi + 1 ) } - f^{lev}_{ p( \Pi + 1 ) } } { \chi( \Pi + 1 ) C^2 } \]
where \( \chi \) is the LpsFct factor and \( C \) is the Lipschitz constant.
Note that GetStepsize() only returns the value, the actual step computation being done by NewStep().
Reimplemented from Stepsize.
|
inlinevirtual |
The variant requires thats DR must be computed before SR. Hence, the call to NewDEF comes before the one to NewStep.
Implements Deflection.
|
inlinevirtual |
This method must be called before GetStepsize() [see below]. This is indeed the core of every derived class, producing a new step.
If the derived class implements a target value stepsize rule, the method must compute both the scalar \( \beta_i \) and the level \( f^{lev}_i \).
Typically, the previous step will be unavailable after the call to NewStep() [see GetStepsize()].
Implements Stepsize.
|
inlinevirtual |
Changes the maximum value of \( \beta_i \) for a target value stepsize rule.
Typically, the method implements the safe rule of the stepsize-restricted approach. Passing the deflection coefficient \( \alpha_i \) does exactly this job.
Reimplemented from Stepsize.