ROL
ROL::ChebyshevSpectral< Real > Class Template Reference

Provides an interface for the Chebyshev-Spectral risk measure. More...

#include <ROL_ChebyshevSpectral.hpp>

Inheritance diagram for ROL::ChebyshevSpectral< Real >:

Public Member Functions

 ChebyshevSpectral (ROL::ParameterList &parlist)
 Constructor.
 ChebyshevSpectral (const Real lower, const Real upper, const int nQuad, const int wType, const ROL::Ptr< PlusFunction< Real > > &pf)
 Constructor.
Public Member Functions inherited from ROL::SpectralRisk< Real >
 SpectralRisk (void)
 SpectralRisk (const ROL::Ptr< Distribution< Real > > &dist, const int nQuad, const ROL::Ptr< PlusFunction< Real > > &pf)
 SpectralRisk (ROL::ParameterList &parlist)
 SpectralRisk (const std::vector< Real > &pts, const std::vector< Real > &wts, const ROL::Ptr< PlusFunction< Real > > &pf)
void setStorage (const Ptr< ScalarController< Real > > &value_storage, const Ptr< VectorController< Real > > &gradient_storage) override
void setHessVecStorage (const Ptr< ScalarController< Real > > &gradvec_storage, const Ptr< VectorController< Real > > &hessvec_storage) override
void setSample (const std::vector< Real > &point, const Real weight) override
void resetStorage (bool flag=true) override
void resetStorage (UpdateType type) override
void initialize (const Vector< Real > &x) override
Real computeStatistic (const Ptr< const std::vector< Real > > &xstat) const override
void updateValue (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol) override
void updateGradient (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol) override
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) override
Real getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler) override
void getGradient (Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler) override
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) override

Private Member Functions

void checkInputs (void) const
void initializeQuad (void)

Private Attributes

ROL::Ptr< PlusFunction< Real > > plusFunction_
Real lower_
Real upper_
int nQuad_
int wType_
std::vector< Real > wts_
std::vector< Real > pts_

Additional Inherited Members

Protected Member Functions inherited from ROL::SpectralRisk< Real >
void buildMixedQuantile (const std::vector< Real > &pts, const std::vector< Real > &wts, const ROL::Ptr< PlusFunction< Real > > &pf)
void buildQuadFromDist (std::vector< Real > &pts, std::vector< Real > &wts, const int nQuad, const ROL::Ptr< Distribution< Real > > &dist) const
void printQuad (const std::vector< Real > &pts, const std::vector< Real > &wts, const bool print=false) const

Detailed Description

template<class Real>
class ROL::ChebyshevSpectral< Real >

Provides an interface for the Chebyshev-Spectral risk measure.

The Chebyshev-Spectral risk measure is defined as

\[ \mathcal{R}(X) = \int_{\alpha_0}^{\alpha_1} w(\alpha) \mathrm{CVaR}_{\alpha}(X) \,\mathrm{d}\alpha \]

where \(0\le \alpha_0 < \alpha_1 < 1\) and the conditional value-at-risk (CVaR) with confidence level \(0\le \alpha < 1\) is

\[ \mathrm{CVaR}_\alpha(X) = \inf_{t\in\mathbb{R}} \left\{ t + \frac{1}{1-\alpha} \mathbb{E}\left[(X-t)_+\right] \right\}, \quad (x)_+ = \max\{0,x\}. \]

There are three choices of weight functions \(w\): (i) the first weight function generates the Chebyshev polynomials of the first kind and has the specific form

\[ w(x) = \frac{1}{\sqrt{(x-\alpha_0)(\alpha_1-x)}}; \]

(ii) the second weight function generates the Chebyshev polynomials of the second kind and has the specific form

\[ w(x) = \sqrt{(x-\alpha_0)(\alpha_1-x)}; \]

and (iii) the third weight function is related again to the Chebyshev polynomials of the first kind and has the specific form

\[ w(x) = \sqrt{\frac{x-\alpha_0}{\alpha_1-x}}. \]

As defined, \(\mathcal{R}\) is a law-invariant coherent risk measure.

ROL implements \(\mathcal{R}\) by approximating the integral with the appropriate Gauss-Chebyshev quadrature rule. The corresponding quadrature points and weights are then used to construct a ROL::MixedQuantileQuadrangle risk measure. When using derivative-based optimization, the user can provide a smooth approximation of \((\cdot)_+\) using the ROL::PlusFunction class.

Definition at line 63 of file ROL_ChebyshevSpectral.hpp.

Constructor & Destructor Documentation

◆ ChebyshevSpectral() [1/2]

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

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

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

  • "Lower Bound" (between 0 and 1)
  • "Upper Bound" (between 0 and 1, greater than "Lower Bound")
  • "Weight Type" (either 1, 2, or 3)
  • "Number of Quadrature Points"
  • A sublist for plus function information.

Definition at line 124 of file ROL_ChebyshevSpectral.hpp.

References checkInputs(), initializeQuad(), lower_, nQuad_, plusFunction_, ROL::SpectralRisk< Real >::SpectralRisk(), upper_, and wType_.

◆ ChebyshevSpectral() [2/2]

template<class Real>
ROL::ChebyshevSpectral< Real >::ChebyshevSpectral ( const Real lower,
const Real upper,
const int nQuad,
const int wType,
const ROL::Ptr< PlusFunction< Real > > & pf )
inline

Constructor.

Parameters
[in]loweris the lower confidence level (between 0 and 1)
[in]upperis the upper confidence level (between 0 and 1, greater than lower)
[in]nQuadis the number of quadrature points
[in]wTypeis the weight type (either 1, 2, or 3)
[in]pfis the plus function or an approximation

Definition at line 147 of file ROL_ChebyshevSpectral.hpp.

References checkInputs(), initializeQuad(), lower_, nQuad_, plusFunction_, ROL::SpectralRisk< Real >::SpectralRisk(), upper_, and wType_.

Member Function Documentation

◆ checkInputs()

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

Definition at line 74 of file ROL_ChebyshevSpectral.hpp.

References lower_, plusFunction_, upper_, and wType_.

Referenced by ChebyshevSpectral(), and ChebyshevSpectral().

◆ initializeQuad()

template<class Real>
void ROL::ChebyshevSpectral< Real >::initializeQuad ( void )
inlineprivate

Member Data Documentation

◆ plusFunction_

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

◆ lower_

template<class Real>
Real ROL::ChebyshevSpectral< Real >::lower_
private

◆ upper_

template<class Real>
Real ROL::ChebyshevSpectral< Real >::upper_
private

◆ nQuad_

template<class Real>
int ROL::ChebyshevSpectral< Real >::nQuad_
private

Definition at line 68 of file ROL_ChebyshevSpectral.hpp.

Referenced by ChebyshevSpectral(), ChebyshevSpectral(), and initializeQuad().

◆ wType_

template<class Real>
int ROL::ChebyshevSpectral< Real >::wType_
private

◆ wts_

template<class Real>
std::vector<Real> ROL::ChebyshevSpectral< Real >::wts_
private

Definition at line 71 of file ROL_ChebyshevSpectral.hpp.

Referenced by initializeQuad().

◆ pts_

template<class Real>
std::vector<Real> ROL::ChebyshevSpectral< Real >::pts_
private

Definition at line 72 of file ROL_ChebyshevSpectral.hpp.

Referenced by initializeQuad().


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