ROL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::HMCR< Real > Class Template Reference

Provides an interface for a convex combination of the expected value and the higher moment coherent risk measure. More...

#include <ROL_HMCR.hpp>

+ Inheritance diagram for ROL::HMCR< Real >:

Public Member Functions

 HMCR (const Real prob, const Real lambda, const unsigned order, const ROL::Ptr< PlusFunction< Real > > &pf)
 Constructor. More...
 
 HMCR (ROL::ParameterList &parlist)
 Constructor. More...
 
void initialize (const Vector< Real > &x)
 Initialize temporary variables. More...
 
void updateValue (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal storage for value computation. More...
 
Real getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure value. More...
 
void updateGradient (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
 Update internal risk measure storage for gradient computation. More...
 
void getGradient (Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
 Return risk measure (sub)gradient. More...
 
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)
 Update internal risk measure storage for Hessian-time-a-vector computation. More...
 
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)
 Return risk measure Hessian-times-a-vector. More...
 
- Public Member Functions inherited from ROL::RandVarFunctional< Real >
virtual ~RandVarFunctional ()
 
 RandVarFunctional (void)
 
 weight_ (0)
 
void useStorage (bool storage)
 
void useHessVecStorage (bool storage)
 
virtual void setStorage (const Ptr< SampledScalar< Real >> &value_storage, const Ptr< SampledVector< Real >> &gradient_storage)
 
virtual void setHessVecStorage (const Ptr< SampledScalar< Real >> &gradvec_storage, const Ptr< SampledVector< Real >> &hessvec_storage)
 
virtual void resetStorage (bool flag=true)
 Reset internal storage. More...
 
virtual void setSample (const std::vector< Real > &point, const Real weight)
 
virtual Real computeStatistic (const Ptr< const std::vector< Real >> &xstat) const
 Compute statistic. More...
 

Private Member Functions

void checkInputs (void) const
 

Private Attributes

ROL::Ptr< PlusFunction< Real > > plusFunction_
 
Real prob_
 
Real lambda_
 
unsigned order_
 
Real coeff_
 
ROL::Ptr< Vector< Real > > mDualVector_
 
Real pnorm_
 
Real coeff0_
 
Real coeff1_
 
Real coeff2_
 
bool HMCR_firstReset_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::RandVarFunctional< Real >
Real computeValue (Objective< Real > &obj, const Vector< Real > &x, Real &tol)
 
void computeGradient (Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
 
Real computeGradVec (Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
void computeHessVec (Vector< Real > &hv, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
- Protected Attributes inherited from ROL::RandVarFunctional< Real >
Real val_
 
Real gv_
 
Ptr< Vector< Real > > g_
 
Ptr< Vector< Real > > hv_
 
Ptr< Vector< Real > > dualVector_
 
bool firstReset_
 
std::vector< Real > point_
 
Real weight_
 

Detailed Description

template<class Real>
class ROL::HMCR< Real >

Provides an interface for a convex combination of the expected value and the higher moment coherent risk measure.

The higher moment coherent risk measure of order \(p\) 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)_+^p\right]^{1/p} \right\} \]

where \((x)_+ = \max\{0,x\}\). \(\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)\).

The user can provide a smooth approximation of \((\cdot)_+\) using the ROL::PlusFunction class.

Definition at line 75 of file ROL_HMCR.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::HMCR< Real >::HMCR ( const Real  prob,
const Real  lambda,
const unsigned  order,
const ROL::Ptr< PlusFunction< Real > > &  pf 
)
inline

Constructor.

Parameters
[in]probis the confidence level
[in]lambdais the convex combination parameter (lambda=0 corresponds to the expected value whereas lambda=1 corresponds to the higher moment coherent risk measure)
[in]orderis the order of higher moment coherent risk measure
[in]pfis the plus function or an approximation

Definition at line 134 of file ROL_HMCR.hpp.

References ROL::HMCR< Real >::checkInputs(), ROL::HMCR< Real >::coeff_, and ROL::HMCR< Real >::prob_.

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

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

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

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

Definition at line 156 of file ROL_HMCR.hpp.

References ROL::HMCR< Real >::checkInputs(), ROL::HMCR< Real >::coeff_, ROL::HMCR< Real >::lambda_, ROL::HMCR< Real >::order_, ROL::HMCR< Real >::plusFunction_, and ROL::HMCR< Real >::prob_.

Member Function Documentation

template<class Real >
void ROL::HMCR< Real >::checkInputs ( void  ) const
inlineprivate
template<class Real >
void ROL::HMCR< Real >::initialize ( const Vector< Real > &  x)
inlinevirtual
template<class Real >
void ROL::HMCR< Real >::updateValue ( Objective< Real > &  obj,
const Vector< Real > &  x,
const std::vector< Real > &  xstat,
Real &  tol 
)
inlinevirtual

Update internal storage for value computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 188 of file ROL_HMCR.hpp.

References ROL::RandVarFunctional< Real >::computeValue(), ROL::HMCR< Real >::order_, ROL::HMCR< Real >::plusFunction_, ROL::HMCR< Real >::pnorm_, ROL::RandVarFunctional< Real >::val_, and ROL::RandVarFunctional< Real >::weight_.

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

Return risk measure value.

Parameters
[in]sampleris the ROL::SampleGenerator used to sample the objective function

Upon return, getValue returns \(\mathcal{R}(f(x_0))\) where \(f(x_0)\) denotes the random variable objective function evaluated at \(x_0\).

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 201 of file ROL_HMCR.hpp.

References ROL::HMCR< Real >::coeff_, ROL::HMCR< Real >::lambda_, ROL::HMCR< Real >::order_, ROL::HMCR< Real >::pnorm_, ROL::SampleGenerator< Real >::sumAll(), and ROL::RandVarFunctional< Real >::val_.

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

Update internal risk measure storage for gradient computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]gis the gradient of the random variable objective function at the current sample point
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 214 of file ROL_HMCR.hpp.

References ROL::HMCR< Real >::coeff0_, ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::RandVarFunctional< Real >::hv_, ROL::HMCR< Real >::order_, ROL::HMCR< Real >::plusFunction_, ROL::HMCR< Real >::pnorm_, and ROL::RandVarFunctional< Real >::weight_.

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

Return risk measure (sub)gradient.

Parameters
[out]gis the (sub)gradient of the risk measure
[in]sampleris the ROL::SampleGenerator used to sample the objective function

Upon return, getGradient returns \(\theta\in\partial\mathcal{R}(f(x_0))\) where \(f(x_0)\) denotes the random variable objective function evaluated at \(x_0\) and \(\partial\mathcal{R}(X)\) denotes the subdifferential of \(\mathcal{R}\) at \(X\).

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 238 of file ROL_HMCR.hpp.

References ROL::Vector< Real >::axpy(), ROL::HMCR< Real >::coeff0_, ROL::HMCR< Real >::coeff_, ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::RandVarFunctional< Real >::hv_, ROL::HMCR< Real >::lambda_, ROL::HMCR< Real >::order_, ROL::HMCR< Real >::pnorm_, ROL::Vector< Real >::scale(), ROL::SampleGenerator< Real >::sumAll(), and zero.

template<class Real >
void ROL::HMCR< 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 
)
inlinevirtual

Update internal risk measure storage for Hessian-time-a-vector computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]gis the gradient of the random variable objective function at the current sample point
[in]gvis the gradient of the random variable objective function at the current sample point applied to the vector v0
[in]hvis the Hessian of the random variable objective function at the current sample point applied to the vector v0
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 266 of file ROL_HMCR.hpp.

References ROL::HMCR< Real >::coeff0_, ROL::HMCR< Real >::coeff1_, ROL::HMCR< Real >::coeff2_, ROL::RandVarFunctional< Real >::computeGradVec(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::RandVarFunctional< Real >::hv_, ROL::HMCR< Real >::mDualVector_, ROL::HMCR< Real >::order_, ROL::HMCR< Real >::plusFunction_, ROL::HMCR< Real >::pnorm_, and ROL::RandVarFunctional< Real >::weight_.

template<class Real >
void ROL::HMCR< 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 
)
inlinevirtual

Return risk measure Hessian-times-a-vector.

Parameters
[out]hvis the Hessian-times-a-vector of the risk measure
[in]sampleris the ROL::SampleGenerator used to sample the objective function

Upon return, getHessVec returns \(\nabla^2 \mathcal{R}(f(x_0))v_0\) (if available) where \(f(x_0)\) denotes the random variable objective function evaluated at \(x_0\).

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 304 of file ROL_HMCR.hpp.

References ROL::Vector< Real >::axpy(), ROL::HMCR< Real >::coeff0_, ROL::HMCR< Real >::coeff1_, ROL::HMCR< Real >::coeff2_, ROL::HMCR< Real >::coeff_, ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::RandVarFunctional< Real >::hv_, ROL::HMCR< Real >::lambda_, ROL::HMCR< Real >::mDualVector_, ROL::HMCR< Real >::order_, ROL::HMCR< Real >::pnorm_, ROL::Vector< Real >::scale(), ROL::SampleGenerator< Real >::sumAll(), and zero.

Member Data Documentation

template<class Real >
ROL::Ptr<PlusFunction<Real> > ROL::HMCR< Real >::plusFunction_
private
template<class Real >
Real ROL::HMCR< Real >::prob_
private

Definition at line 79 of file ROL_HMCR.hpp.

Referenced by ROL::HMCR< Real >::checkInputs(), and ROL::HMCR< Real >::HMCR().

template<class Real >
Real ROL::HMCR< Real >::lambda_
private
template<class Real >
unsigned ROL::HMCR< Real >::order_
private
template<class Real >
Real ROL::HMCR< Real >::coeff_
private
template<class Real >
ROL::Ptr<Vector<Real> > ROL::HMCR< Real >::mDualVector_
private
template<class Real >
Real ROL::HMCR< Real >::pnorm_
private
template<class Real >
Real ROL::HMCR< Real >::coeff0_
private
template<class Real >
Real ROL::HMCR< Real >::coeff1_
private
template<class Real >
Real ROL::HMCR< Real >::coeff2_
private
template<class Real >
bool ROL::HMCR< Real >::HMCR_firstReset_
private

Definition at line 96 of file ROL_HMCR.hpp.

Referenced by ROL::HMCR< Real >::initialize().


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