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

Provides an interface for a convex combination of risk measures. More...

#include <ROL_ConvexCombinationRiskMeasure.hpp>

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

Public Member Functions

 ConvexCombinationRiskMeasure (ROL::ParameterList &parlist)
 Constructor. More...
 
void setSample (const std::vector< Real > &point, const Real weight)
 
void resetStorage (bool flag=true)
 Reset internal storage. More...
 
void resetStorage (UpdateType type)
 
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< ScalarController< Real >> &value_storage, const Ptr< VectorController< Real >> &gradient_storage)
 
virtual void setHessVecStorage (const Ptr< ScalarController< Real >> &gradvec_storage, const Ptr< VectorController< Real >> &hessvec_storage)
 
virtual Real computeStatistic (const Ptr< const std::vector< Real >> &xstat) const
 Compute statistic. More...
 

Private Types

typedef std::vector< Real >
::size_type 
uint
 

Private Member Functions

void initializeCCRM (void)
 
void checkInputs (void)
 

Private Attributes

std::vector< Real > lambda_
 
std::vector< ROL::Ptr
< RandVarFunctional< Real > > > 
risk_
 
uint size_
 
std::vector< int > statVec_
 
Ptr< ScalarController< Real > > values_
 
Ptr< ScalarController< Real > > gradvecs_
 
Ptr< VectorController< Real > > gradients_
 
Ptr< VectorController< Real > > hessvecs_
 

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::ConvexCombinationRiskMeasure< Real >

Provides an interface for a convex combination of risk measures.

This function provides the capability to produce a convex combination of risk measure, i.e.,

\[ \mathcal{R}(X) = \sum_{k=1}^n \lambda_k \mathcal{R}_k(X) \]

where \(\mathcal{R}_k\) are risk measures and \(\lambda_k \ge 0\) with \(\lambda_1 + \ldots + \lambda_n = 1\). In general, \(\mathcal{R}\) is not law-invariant or coherent unless each \(\mathcal{R}_k\) is.

Definition at line 34 of file ROL_ConvexCombinationRiskMeasure.hpp.

Member Typedef Documentation

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

Definition at line 36 of file ROL_ConvexCombinationRiskMeasure.hpp.

Constructor & Destructor Documentation

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

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

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

  • "Convex Combination Parameters" (greater than 0 and sum to 1)
  • Sublists labeled 1 to n with risk measure definitions.

Definition at line 92 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::checkInputs(), ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::RiskMeasureInfo(), ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

Member Function Documentation

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::initializeCCRM ( void  )
inlineprivate
template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::checkInputs ( void  )
inlineprivate
template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::setSample ( const std::vector< Real > &  point,
const Real  weight 
)
inlinevirtual
template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::resetStorage ( bool  flag = true)
inlinevirtual

Reset internal storage.

Parameters
[in]xis a vector used for initializing storage

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 131 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::RandVarFunctional< Real >::resetStorage(), ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::resetStorage ( UpdateType  type)
inlinevirtual
template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::initialize ( const Vector< Real > &  x)
inlinevirtual

Initialize temporary variables.

Parameters
[in]xis a vector used for initializing storage

Reimplemented from ROL::RandVarFunctional< Real >.

Definition at line 145 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::RandVarFunctional< Real >::initialize(), ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

template<class Real >
void ROL::ConvexCombinationRiskMeasure< 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 152 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

template<class Real >
Real ROL::ConvexCombinationRiskMeasure< 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 168 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

template<class Real >
void ROL::ConvexCombinationRiskMeasure< 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 185 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

template<class Real >
void ROL::ConvexCombinationRiskMeasure< 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 201 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::Vector< Real >::axpy(), ROL::RandVarFunctional< Real >::g_, ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

template<class Real >
void ROL::ConvexCombinationRiskMeasure< 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 225 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

template<class Real >
void ROL::ConvexCombinationRiskMeasure< 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 245 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::Vector< Real >::axpy(), ROL::RandVarFunctional< Real >::hv_, ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::ConvexCombinationRiskMeasure< Real >::statVec_.

Member Data Documentation

template<class Real >
std::vector<Real> ROL::ConvexCombinationRiskMeasure< Real >::lambda_
private
template<class Real >
std::vector<ROL::Ptr<RandVarFunctional<Real> > > ROL::ConvexCombinationRiskMeasure< Real >::risk_
private
template<class Real >
uint ROL::ConvexCombinationRiskMeasure< Real >::size_
private
template<class Real >
std::vector<int> ROL::ConvexCombinationRiskMeasure< Real >::statVec_
private
template<class Real >
Ptr<ScalarController<Real> > ROL::ConvexCombinationRiskMeasure< Real >::values_
private
template<class Real >
Ptr<ScalarController<Real> > ROL::ConvexCombinationRiskMeasure< Real >::gradvecs_
private
template<class Real >
Ptr<VectorController<Real> > ROL::ConvexCombinationRiskMeasure< Real >::gradients_
private
template<class Real >
Ptr<VectorController<Real> > ROL::ConvexCombinationRiskMeasure< Real >::hessvecs_
private

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