ROL
ROL::CVaR< Real > Class Template Reference

Provides an interface for a convex combination of the expected value and the conditional value-at-risk. More...

#include <ROL_CVaR.hpp>

Inheritance diagram for ROL::CVaR< Real >:

Public Member Functions

 CVaR (const Real prob, const Real coeff, const Ptr< PlusFunction< Real > > &pf)
 Constructor.
 CVaR (ROL::ParameterList &parlist)
 Constructor.
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 Member Functions

void checkInputs (void) const

Private Attributes

Ptr< PlusFunction< Real > > plusFunction_
Real prob_
Real coeff_

Detailed Description

template<class Real>
class ROL::CVaR< Real >

Provides an interface for a convex combination of the expected value and the conditional value-at-risk.

The conditional value-at-risk (also called the average value-at-risk or the expected shortfall) with confidence level \(0\le \beta < 1\) is

\[ \mathcal{R}(X) = \inf_{t\in\mathbb{R}} \left\{ t + \frac{1}{1-\beta} \mathbb{E}\left[(X-t)_+\right] \right\} \]

where \((x)_+ = \max\{0,x\}\). If the distribution of \(X\) is continuous, then \(\mathcal{R}\) is the conditional expectation of \(X\) exceeding the \(\beta\)-quantile of \(X\) and the optimal \(t\) is the \(\beta\)-quantile. Additionally, \(\mathcal{R}\) is a law-invariant coherent risk measure. ROL implements this by augmenting the optimization vector \(x_0\) with the parameter \(t\), then minimizes jointly for \((x_0,t)\).

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

Definition at line 44 of file ROL_CVaR.hpp.

Constructor & Destructor Documentation

◆ CVaR() [1/2]

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

Constructor.

Parameters
[in]probis the confidence level
[in]coeffis the convex combination parameter (coeff=0 corresponds to the expected value whereas coeff=1 corresponds to the conditional value-at-risk)
[in]pfis the plus function or an approximation

Definition at line 84 of file ROL_CVaR.hpp.

References checkInputs(), coeff_, plusFunction_, and prob_.

◆ CVaR() [2/2]

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

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

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

  • "Confidence Level" (between 0 and 1)
  • "Convex Combination Parameter" (between 0 and 1)
  • A sublist for plus function information.

Definition at line 100 of file ROL_CVaR.hpp.

References checkInputs(), coeff_, plusFunction_, and prob_.

Member Function Documentation

◆ checkInputs()

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

Definition at line 64 of file ROL_CVaR.hpp.

References coeff_, plusFunction_, prob_, and zero.

Referenced by CVaR(), and CVaR().

◆ updateValue()

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

Definition at line 113 of file ROL_CVaR.hpp.

References coeff_, plusFunction_, and prob_.

◆ updateGradient()

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

Definition at line 123 of file ROL_CVaR.hpp.

References coeff_, plusFunction_, prob_, and ROL::ROL_EPSILON().

◆ updateHessVec()

template<class Real>
void ROL::CVaR< 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 138 of file ROL_CVaR.hpp.

References coeff_, plusFunction_, prob_, and ROL::ROL_EPSILON().

◆ getValue()

template<class Real>
Real ROL::CVaR< Real >::getValue ( const Vector< Real > & x,
const std::vector< Real > & xstat,
SampleGenerator< Real > & sampler )
inline

Definition at line 162 of file ROL_CVaR.hpp.

References coeff_, and ROL::SampleGenerator< Real >::sumAll().

◆ getGradient()

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

Definition at line 171 of file ROL_CVaR.hpp.

References coeff_, prob_, and ROL::SampleGenerator< Real >::sumAll().

◆ getHessVec()

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

Definition at line 184 of file ROL_CVaR.hpp.

References coeff_, prob_, and ROL::SampleGenerator< Real >::sumAll().

Member Data Documentation

◆ plusFunction_

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

Definition at line 46 of file ROL_CVaR.hpp.

Referenced by checkInputs(), CVaR(), CVaR(), updateGradient(), updateHessVec(), and updateValue().

◆ prob_

template<class Real>
Real ROL::CVaR< Real >::prob_
private

◆ coeff_

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

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