ROL
ROL::MeanVariance< Real > Class Template Reference

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

#include <ROL_MeanVariance.hpp>

Inheritance diagram for ROL::MeanVariance< Real >:

Public Member Functions

 MeanVariance (const Real order, const Real coeff, const Ptr< PositiveFunction< Real > > &pf)
 Constructor.
 MeanVariance (const std::vector< Real > &order, const std::vector< Real > &coeff, const Ptr< PositiveFunction< Real > > &pf)
 Constructor.
 MeanVariance (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 updateValue (Objective< Real > &obj, 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 updateGradient (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
void getGradient (Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
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)
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 initializeMV (void)
void checkInputs (void)

Private Attributes

Ptr< PositiveFunction< Real > > positiveFunction_
std::vector< Real > order_
std::vector< Real > coeff_
uint NumMoments_
Ptr< ScalarController< Real > > values_
Ptr< ScalarController< Real > > gradvecs_
Ptr< VectorController< Real > > gradients_
Ptr< VectorController< Real > > hessvecs_

Detailed Description

template<class Real>
class ROL::MeanVariance< Real >

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

The mean plus variances risk measure is

\[ \mathcal{R}(X) = \mathbb{E}[X] + \sum_{k=1}^n c_k \mathbb{E}[\wp(X-\mathbb{E}[X])^{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}\). \(\mathcal{R}\) is law-invariant, but not coherent since it violates positive homogeneity. When \(\wp(x) = |x|\), \(\mathcal{R}\) also violates monotonicity.

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

Definition at line 44 of file ROL_MeanVariance.hpp.

Member Typedef Documentation

◆ uint

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

Definition at line 45 of file ROL_MeanVariance.hpp.

Constructor & Destructor Documentation

◆ MeanVariance() [1/3]

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

Constructor.

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

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

Definition at line 107 of file ROL_MeanVariance.hpp.

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

◆ MeanVariance() [2/3]

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

Constructor.

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

This constructor produces a mean plus variance risk measure with an arbitrary number of variances.

Definition at line 125 of file ROL_MeanVariance.hpp.

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

◆ MeanVariance() [3/3]

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

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

parlist should contain sublists "SOL"->"Risk Measure"->"Mean Plus Variance" and within the "Mean Plus Variance" 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 151 of file ROL_MeanVariance.hpp.

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

Member Function Documentation

◆ initializeMV()

template<class Real>
void ROL::MeanVariance< Real >::initializeMV ( void )
inlineprivate

Definition at line 71 of file ROL_MeanVariance.hpp.

References gradients_, gradvecs_, hessvecs_, and values_.

Referenced by checkInputs().

◆ checkInputs()

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

Definition at line 81 of file ROL_MeanVariance.hpp.

References coeff_, initializeMV(), order_, positiveFunction_, and zero.

Referenced by MeanVariance(), MeanVariance(), and MeanVariance().

◆ setStorage()

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

Definition at line 175 of file ROL_MeanVariance.hpp.

References gradients_, and values_.

◆ setHessVecStorage()

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

Definition at line 182 of file ROL_MeanVariance.hpp.

References gradvecs_, and hessvecs_.

◆ updateValue()

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

Definition at line 189 of file ROL_MeanVariance.hpp.

◆ getValue()

◆ updateGradient()

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

Definition at line 219 of file ROL_MeanVariance.hpp.

◆ getGradient()

◆ updateHessVec()

template<class Real>
void ROL::MeanVariance< 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 262 of file ROL_MeanVariance.hpp.

◆ getHessVec()

template<class Real>
void ROL::MeanVariance< 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::MeanVariance< Real >::positiveFunction_
private

◆ order_

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

◆ coeff_

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

◆ NumMoments_

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

◆ values_

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

Definition at line 52 of file ROL_MeanVariance.hpp.

Referenced by getGradient(), getHessVec(), getValue(), initializeMV(), and setStorage().

◆ gradvecs_

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

Definition at line 53 of file ROL_MeanVariance.hpp.

Referenced by getHessVec(), initializeMV(), and setHessVecStorage().

◆ gradients_

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

Definition at line 54 of file ROL_MeanVariance.hpp.

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

◆ hessvecs_

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

Definition at line 55 of file ROL_MeanVariance.hpp.

Referenced by getHessVec(), initializeMV(), and setHessVecStorage().


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