ROL
ROL::MeanSemiDeviation< Real > Class Template Reference

Provides an interface for the mean plus upper semideviation of order 1. More...

#include <ROL_MeanSemiDeviation.hpp>

Inheritance diagram for ROL::MeanSemiDeviation< Real >:

Public Member Functions

 MeanSemiDeviation (const Real coeff, const Ptr< PlusFunction< Real > > &pf)
 Constructor.
 MeanSemiDeviation (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)
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 Member Functions

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

Private Attributes

Ptr< PlusFunction< Real > > plusFunction_
Real coeff_
Ptr< ScalarController< Real > > values_
Ptr< ScalarController< Real > > gradvecs_
Ptr< VectorController< Real > > gradients_
Ptr< VectorController< Real > > hessvecs_

Detailed Description

template<class Real>
class ROL::MeanSemiDeviation< Real >

Provides an interface for the mean plus upper semideviation of order 1.

Provides an interface for the mean plus upper semideviation from target of order 1.

The mean plus upper semideviation of order 1 with constant \(0 < c < 1\) is

\[ \mathcal{R}(X) = \mathbb{E}[X] + c \mathbb{E}\left[(X-\mathbb{E}[X])_+\right] \right\} \]

where \((x)_+ = \max\{0,x\}\). \(\mathcal{R}\) is a law-invariant coherent risk measure.

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

The mean plus upper semideviation from target of order 1 with constant \(0 < c < 1\) and target \(t\in\mathbb{R}\) is

\[ \mathcal{R}(X) = \mathbb{E}[X] + c \mathbb{E}\left[(X-t)_+\right] \right\} \]

where \((x)_+ = \max\{0,x\}\). \(\mathcal{R}\) is a law-invariant risk measure.

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

Definition at line 72 of file ROL_MeanSemiDeviation.hpp.

Constructor & Destructor Documentation

◆ MeanSemiDeviation() [1/2]

template<class Real>
ROL::MeanSemiDeviation< Real >::MeanSemiDeviation ( const Real coeff,
const Ptr< PlusFunction< Real > > & pf )
inline

Constructor.

Parameters
[in]coeffis the coefficient scaling the semideviation
[in]pfis the plus function or an approximation

Definition at line 127 of file ROL_MeanSemiDeviation.hpp.

References checkInputs(), coeff_, and plusFunction_.

◆ MeanSemiDeviation() [2/2]

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

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

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

  • "Coefficient" (between 0 and 1)
  • A sublist for plus function information.

Definition at line 141 of file ROL_MeanSemiDeviation.hpp.

References checkInputs(), coeff_, and plusFunction_.

Member Function Documentation

◆ initializeStorage()

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

Definition at line 96 of file ROL_MeanSemiDeviation.hpp.

References gradients_, gradvecs_, hessvecs_, and values_.

Referenced by checkInputs().

◆ clear()

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

Definition at line 106 of file ROL_MeanSemiDeviation.hpp.

References gradvecs_, and hessvecs_.

Referenced by initialize().

◆ checkInputs()

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

Definition at line 111 of file ROL_MeanSemiDeviation.hpp.

References coeff_, initializeStorage(), plusFunction_, and zero.

Referenced by MeanSemiDeviation(), and MeanSemiDeviation().

◆ setStorage()

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

Definition at line 153 of file ROL_MeanSemiDeviation.hpp.

References gradients_, and values_.

◆ setHessVecStorage()

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

Definition at line 160 of file ROL_MeanSemiDeviation.hpp.

References gradvecs_, and hessvecs_.

◆ initialize()

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

Definition at line 167 of file ROL_MeanSemiDeviation.hpp.

References clear().

◆ updateValue()

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

Definition at line 172 of file ROL_MeanSemiDeviation.hpp.

◆ getValue()

◆ updateGradient()

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

Definition at line 199 of file ROL_MeanSemiDeviation.hpp.

◆ getGradient()

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

◆ updateHessVec()

template<class Real>
void ROL::MeanSemiDeviation< 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 239 of file ROL_MeanSemiDeviation.hpp.

◆ getHessVec()

template<class Real>
void ROL::MeanSemiDeviation< 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

◆ plusFunction_

template<class Real>
Ptr<PlusFunction<Real> > ROL::MeanSemiDeviation< Real >::plusFunction_
private

◆ coeff_

template<class Real>
Real ROL::MeanSemiDeviation< Real >::coeff_
private

◆ values_

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

◆ gradvecs_

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

Definition at line 78 of file ROL_MeanSemiDeviation.hpp.

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

◆ gradients_

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

Definition at line 79 of file ROL_MeanSemiDeviation.hpp.

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

◆ hessvecs_

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

Definition at line 80 of file ROL_MeanSemiDeviation.hpp.

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


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