ROL
ROL::MeanDeviation< Real > Class Template Reference

Provides an interface for the mean plus a sum of arbitrary order deviations. More...

#include <ROL_MeanDeviation.hpp>

Inheritance diagram for ROL::MeanDeviation< Real >:

Public Member Functions

 MeanDeviation (const Real order, const Real coeff, const Ptr< PositiveFunction< Real > > &pf)
 Constructor.
 MeanDeviation (const std::vector< Real > &order, const std::vector< Real > &coeff, const Ptr< PositiveFunction< Real > > &pf)
 Constructor.
 MeanDeviation (ROL::ParameterList &parlist)
 Constructor.
void setStorage (const Ptr< ScalarController< Real > > &value_storage, const Ptr< VectorController< Real > > &gradient_storage)
void setHessVecStorage (const Ptr< ScalarController< Real > > &gradvec_storage, const Ptr< VectorController< Real > > &hessvec_storage)
void initialize (const Vector< Real > &x)
void updateValue (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
void updateGradient (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
void updateHessVec (Objective< Real > &obj, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Real getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
void getGradient (Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
void getHessVec (Vector< Real > &hv, std::vector< Real > &hvstat, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)

Private Types

typedef std::vector< Real >::size_type uint

Private Member Functions

void initializeStorage (void)
void clear (void)
void checkInputs (void)

Private Attributes

Ptr< PositiveFunction< Real > > positiveFunction_
std::vector< Real > order_
std::vector< Real > coeff_
uint NumMoments_
std::vector< Real > dev0_
std::vector< Real > dev1_
std::vector< Real > dev2_
std::vector< Real > dev3_
std::vector< Real > des0_
std::vector< Real > des1_
std::vector< Real > des2_
std::vector< Real > des3_
std::vector< Real > devp_
std::vector< Real > gvp1_
std::vector< Real > gvp2_
std::vector< Real > gvp3_
std::vector< Real > gvs1_
std::vector< Real > gvs2_
std::vector< Real > gvs3_
Ptr< ScalarController< Real > > values_
Ptr< ScalarController< Real > > gradvecs_
Ptr< VectorController< Real > > gradients_
Ptr< VectorController< Real > > hessvecs_

Detailed Description

template<class Real>
class ROL::MeanDeviation< Real >

Provides an interface for the mean plus a sum of arbitrary order deviations.

The mean plus deviations risk measure is

\[ \mathcal{R}(X) = \mathbb{E}[X] + \sum_{k=1}^n c_k \mathbb{E}[\wp(X-\mathbb{E}[X])^{p_k}]^{1/p_k} \]

where \(\wp:\mathbb{R}\to[0,\infty)\) is either the absolute value or \((x)_+ = \max\{0,x\}\), \(c_k > 0\) and \(p_k\in\mathbb{N}\). In general, \(\mathcal{R}\) is law-invariant, but not coherent. In the specific case that \(\wp(x) = (x)_+\) and \(c_k\in[0,1]\), \(\mathcal{R}\) is coherent. On the other hand, the common mean-plus-standard-deviation risk measure (i.e., \(\wp(x) = |x|\), \(n=1\) and \(p_1 = 2\)) is not coherent since it violates monotonicity.

When using derivative-based optimization, the user can provide a smooth approximation of \((\cdot)_+\) using the ROL::PositiveFunction class.

Definition at line 46 of file ROL_MeanDeviation.hpp.

Member Typedef Documentation

◆ uint

template<class Real>
typedef std::vector<Real>::size_type ROL::MeanDeviation< Real >::uint
private

Definition at line 47 of file ROL_MeanDeviation.hpp.

Constructor & Destructor Documentation

◆ MeanDeviation() [1/3]

template<class Real>
ROL::MeanDeviation< Real >::MeanDeviation ( const Real order,
const Real coeff,
const Ptr< PositiveFunction< Real > > & pf )
inline

Constructor.

Parameters
[in]orderis the deviation order
[in]coeffis the weight for deviation term
[in]pfis the plus function or an approximation

This constructor produces a mean plus deviation risk measure with a single deviation.

Definition at line 159 of file ROL_MeanDeviation.hpp.

References checkInputs(), coeff_, order_, and positiveFunction_.

◆ MeanDeviation() [2/3]

template<class Real>
ROL::MeanDeviation< Real >::MeanDeviation ( const std::vector< Real > & order,
const std::vector< Real > & coeff,
const Ptr< PositiveFunction< Real > > & pf )
inline

Constructor.

Parameters
[in]orderis a vector of deviation orders
[in]coeffis a vector of weights for the deviation terms
[in]pfis the plus function or an approximation

This constructor produces a mean plus deviation risk measure with an arbitrary number of deviations.

Definition at line 176 of file ROL_MeanDeviation.hpp.

References checkInputs(), coeff_, order_, and positiveFunction_.

◆ MeanDeviation() [3/3]

template<class Real>
ROL::MeanDeviation< Real >::MeanDeviation ( ROL::ParameterList & parlist)
inline

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

parlist should contain sublists "SOL"->"Risk Measure"->"Mean Plus Deviation" and within the "Mean Plus Deviation" sublist should have the following parameters

  • "Orders" (array of unsigned integers)
  • "Coefficients" (array of positive scalars)
  • "Deviation Type" (eighter "Upper" or "Absolute")
  • A sublist for positive function information.

Definition at line 201 of file ROL_MeanDeviation.hpp.

References checkInputs(), coeff_, order_, and positiveFunction_.

Member Function Documentation

◆ initializeStorage()

template<class Real>
void ROL::MeanDeviation< Real >::initializeStorage ( void )
inlineprivate

◆ clear()

template<class Real>
void ROL::MeanDeviation< Real >::clear ( void )
inlineprivate

Definition at line 117 of file ROL_MeanDeviation.hpp.

References des0_, des1_, des2_, des3_, dev0_, dev1_, dev2_, dev3_, devp_, gradvecs_, gvp1_, gvp2_, gvp3_, gvs1_, gvs2_, gvs3_, hessvecs_, NumMoments_, and zero.

Referenced by initialize().

◆ checkInputs()

template<class Real>
void ROL::MeanDeviation< Real >::checkInputs ( void )
inlineprivate

◆ setStorage()

template<class Real>
void ROL::MeanDeviation< Real >::setStorage ( const Ptr< ScalarController< Real > > & value_storage,
const Ptr< VectorController< Real > > & gradient_storage )
inline

Definition at line 227 of file ROL_MeanDeviation.hpp.

References gradients_, and values_.

◆ setHessVecStorage()

template<class Real>
void ROL::MeanDeviation< Real >::setHessVecStorage ( const Ptr< ScalarController< Real > > & gradvec_storage,
const Ptr< VectorController< Real > > & hessvec_storage )
inline

Definition at line 234 of file ROL_MeanDeviation.hpp.

References gradvecs_, and hessvecs_.

◆ initialize()

template<class Real>
void ROL::MeanDeviation< Real >::initialize ( const Vector< Real > & x)
inline

Definition at line 241 of file ROL_MeanDeviation.hpp.

References clear().

◆ updateValue()

template<class Real>
void ROL::MeanDeviation< Real >::updateValue ( Objective< Real > & obj,
const Vector< Real > & x,
const std::vector< Real > & xstat,
Real & tol )
inline

Definition at line 246 of file ROL_MeanDeviation.hpp.

◆ updateGradient()

template<class Real>
void ROL::MeanDeviation< Real >::updateGradient ( Objective< Real > & obj,
const Vector< Real > & x,
const std::vector< Real > & xstat,
Real & tol )
inline

Definition at line 254 of file ROL_MeanDeviation.hpp.

◆ updateHessVec()

template<class Real>
void ROL::MeanDeviation< Real >::updateHessVec ( Objective< Real > & obj,
const Vector< Real > & v,
const std::vector< Real > & vstat,
const Vector< Real > & x,
const std::vector< Real > & xstat,
Real & tol )
inline

Definition at line 264 of file ROL_MeanDeviation.hpp.

◆ getValue()

◆ getGradient()

template<class Real>
void ROL::MeanDeviation< Real >::getGradient ( Vector< Real > & g,
std::vector< Real > & gstat,
const Vector< Real > & x,
const std::vector< Real > & xstat,
SampleGenerator< Real > & sampler )
inline

◆ getHessVec()

template<class Real>
void ROL::MeanDeviation< Real >::getHessVec ( Vector< Real > & hv,
std::vector< Real > & hvstat,
const Vector< Real > & v,
const std::vector< Real > & vstat,
const Vector< Real > & x,
const std::vector< Real > & xstat,
SampleGenerator< Real > & sampler )
inline

Member Data Documentation

◆ positiveFunction_

template<class Real>
Ptr<PositiveFunction<Real> > ROL::MeanDeviation< Real >::positiveFunction_
private

◆ order_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::order_
private

◆ coeff_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::coeff_
private

◆ NumMoments_

template<class Real>
uint ROL::MeanDeviation< Real >::NumMoments_
private

Definition at line 52 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getGradient(), getHessVec(), getValue(), and initializeStorage().

◆ dev0_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::dev0_
private

Definition at line 54 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getGradient(), getHessVec(), getValue(), and initializeStorage().

◆ dev1_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::dev1_
private

Definition at line 55 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getGradient(), getHessVec(), and initializeStorage().

◆ dev2_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::dev2_
private

Definition at line 56 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ dev3_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::dev3_
private

Definition at line 57 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ des0_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::des0_
private

Definition at line 58 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getGradient(), getHessVec(), getValue(), and initializeStorage().

◆ des1_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::des1_
private

Definition at line 59 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getGradient(), getHessVec(), and initializeStorage().

◆ des2_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::des2_
private

Definition at line 60 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ des3_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::des3_
private

Definition at line 61 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ devp_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::devp_
private

Definition at line 62 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ gvp1_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::gvp1_
private

Definition at line 63 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ gvp2_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::gvp2_
private

Definition at line 64 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ gvp3_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::gvp3_
private

Definition at line 65 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ gvs1_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::gvs1_
private

Definition at line 66 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ gvs2_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::gvs2_
private

Definition at line 67 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ gvs3_

template<class Real>
std::vector<Real> ROL::MeanDeviation< Real >::gvs3_
private

Definition at line 68 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), and initializeStorage().

◆ values_

template<class Real>
Ptr<ScalarController<Real> > ROL::MeanDeviation< Real >::values_
private

◆ gradvecs_

template<class Real>
Ptr<ScalarController<Real> > ROL::MeanDeviation< Real >::gradvecs_
private

Definition at line 71 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), initializeStorage(), and setHessVecStorage().

◆ gradients_

template<class Real>
Ptr<VectorController<Real> > ROL::MeanDeviation< Real >::gradients_
private

Definition at line 72 of file ROL_MeanDeviation.hpp.

Referenced by getGradient(), getHessVec(), initializeStorage(), and setStorage().

◆ hessvecs_

template<class Real>
Ptr<VectorController<Real> > ROL::MeanDeviation< Real >::hessvecs_
private

Definition at line 73 of file ROL_MeanDeviation.hpp.

Referenced by clear(), getHessVec(), initializeStorage(), and setHessVecStorage().


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