ROL
|
Provides the interface to implement risk measures. More...
#include <ROL_RiskMeasure.hpp>
Public Member Functions | |
virtual | ~RiskMeasure () |
RiskMeasure (void) | |
void | setRiskVectorInfo (const int comp, const int index) |
int | getComponent (void) const |
int | getIndex (void) const |
virtual void | reset (ROL::Ptr< Vector< Real > > &x0, const Vector< Real > &x) |
Reset internal risk measure storage. Called for value and gradient computation. More... | |
virtual void | reset (ROL::Ptr< Vector< Real > > &x0, const Vector< Real > &x, ROL::Ptr< Vector< Real > > &v0, const Vector< Real > &v) |
Reset internal risk measure storage. Called for Hessian-times-a-vector computation. More... | |
virtual void | update (const Real val, const Real weight) |
Update internal risk measure storage for value computation. More... | |
virtual void | update (const Real val, const Vector< Real > &g, const Real weight) |
Update internal risk measure storage for gradient computation. More... | |
virtual void | update (const Real val, const Vector< Real > &g, const Real gv, const Vector< Real > &hv, const Real weight) |
Update internal risk measure storage for Hessian-time-a-vector computation. More... | |
virtual Real | getValue (SampleGenerator< Real > &sampler) |
Return risk measure value. More... | |
virtual void | getGradient (Vector< Real > &g, SampleGenerator< Real > &sampler) |
Return risk measure (sub)gradient. More... | |
virtual void | getHessVec (Vector< Real > &hv, SampleGenerator< Real > &sampler) |
Return risk measure Hessian-times-a-vector. More... | |
Protected Attributes | |
Real | val_ |
Real | gv_ |
ROL::Ptr< Vector< Real > > | g_ |
ROL::Ptr< Vector< Real > > | hv_ |
ROL::Ptr< Vector< Real > > | dualVector_ |
bool | firstReset_ |
int | comp_ |
int | index_ |
Provides the interface to implement risk measures.
Let \((\Omega,\mathcal{F},\mathbb{P})\) be a complete space. Here, \(\Omega\) is the set of outcomes, \(\mathcal{F}\subseteq 2^\Omega\) is a \(\sigma\)-algebra of events and \(\mathbb{P}:\mathcal{F}\to[0,1]\) is a probability measure. Moreover, let \(\mathcal{X}\) be a class of random variables. A risk measure is an extended real-valued functional that associates numerical values to random variables, i.e., \(\mathcal{R}:\mathcal{X}\to\mathbb{R}\cup\{+\infty\}\). In most cases, \(\mathcal{X} = L^p(\Omega,\mathcal{F},\mathbb{P})\) for some \(1\le p\le \infty\).
There are a number of classifications for risk measures. One important class are the coherent risk measures. \(\mathcal{R}\) is coherent if it satisfies the following four axioms:
Another useful characterization is law invariance. \(\mathcal{R}\) is law invariant if \(\mathcal{R}(X) = \mathcal{R}(X')\) whenever \(\mathbb{P}(X\le t) = \mathbb{P}(X'\le t)\) for all \(t\in\mathbb{R}\). Law invariant risk measures are only functions of the distribution of the input random variable.
ROL's risk measure base class is written in a way to exploit parallel sampling. General risk measures may depend on global information such as the expected value of a random variable, \(\mathbb{E}[X]\). Thus, ROL::RiskMeasure contains functions to update intermediate information and to compute desired quantities such as risk values, gradients and Hessians applied to vectors.
Definition at line 96 of file ROL_RiskMeasure.hpp.
|
inlinevirtual |
Definition at line 109 of file ROL_RiskMeasure.hpp.
|
inline |
Definition at line 111 of file ROL_RiskMeasure.hpp.
|
inline |
Definition at line 114 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::comp_, and ROL::RiskMeasure< Real >::index_.
|
inline |
Definition at line 119 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::comp_.
|
inline |
Definition at line 123 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::index_.
|
inlinevirtual |
Reset internal risk measure storage. Called for value and gradient computation.
[out] | x0 | is a user-provided optimization vector |
[in] | x | is a (potentially) augmented risk vector |
On input, \(x\) carries \(x_0\) and any statistics (scalars) associated with the risk measure.
Definition at line 136 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::dualVector_, ROL::RiskMeasure< Real >::firstReset_, ROL::RiskMeasure< Real >::g_, ROL::RiskMeasure< Real >::gv_, ROL::RiskMeasure< Real >::hv_, ROL::RiskMeasure< Real >::val_, and zero.
Referenced by ROL::RiskMeasure< Real >::reset().
|
inlinevirtual |
Reset internal risk measure storage. Called for Hessian-times-a-vector computation.
@param[out] x0 is a user-provided optimization vector @param[in] x is a (potentially) augmented risk vector @param[out] v0 is a user-provided direction vector @param[in] v is a (potentially) augmented risk vector On input, \form#44 carries \form#412 and any statistics (scalars) associated with the risk measure. Similarly, \form#75 carries
\(v_0\) and any statistics (scalars) associated with the risk measure.
Definition at line 165 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::reset().
|
inlinevirtual |
Update internal risk measure storage for value computation.
[in] | val | is the value of the random variable objective function at the current sample point |
[in] | weight | is the weight associated with the current sample point |
Definition at line 180 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::val_.
|
inlinevirtual |
Update internal risk measure storage for gradient computation.
[in] | val | is the value of the random variable objective function at the current sample point |
[in] | g | is the gradient of the random variable objective function at the current sample point |
[in] | weight | is the weight associated with the current sample point |
Definition at line 193 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::g_.
|
inlinevirtual |
Update internal risk measure storage for Hessian-time-a-vector computation.
[in] | val | is the value of the random variable objective function at the current sample point |
[in] | g | is the gradient of the random variable objective function at the current sample point |
[in] | gv | is the gradient of the random variable objective function at the current sample point applied to the vector v0 |
[in] | hv | is the Hessian of the random variable objective function at the current sample point applied to the vector v0 |
[in] | weight | is the weight associated with the current sample point |
Definition at line 212 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::hv_.
|
inlinevirtual |
Return risk measure value.
[in] | sampler | is 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\).
Definition at line 225 of file ROL_RiskMeasure.hpp.
References ROL::SampleGenerator< Real >::sumAll(), and ROL::RiskMeasure< Real >::val_.
|
inlinevirtual |
Return risk measure (sub)gradient.
[out] | g | is the (sub)gradient of the risk measure |
[in] | sampler | is 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\).
Definition at line 242 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::dualVector_, ROL::RiskMeasure< Real >::g_, and ROL::SampleGenerator< Real >::sumAll().
|
inlinevirtual |
Return risk measure Hessian-times-a-vector.
[out] | hv | is the Hessian-times-a-vector of the risk measure |
[in] | sampler | is 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\).
Definition at line 258 of file ROL_RiskMeasure.hpp.
References ROL::RiskMeasure< Real >::dualVector_, ROL::RiskMeasure< Real >::hv_, and ROL::SampleGenerator< Real >::sumAll().
|
protected |
Definition at line 98 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::getValue(), ROL::RiskMeasure< Real >::reset(), and ROL::RiskMeasure< Real >::update().
|
protected |
Definition at line 99 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::reset().
|
protected |
Definition at line 100 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::getGradient(), ROL::RiskMeasure< Real >::reset(), and ROL::RiskMeasure< Real >::update().
|
protected |
Definition at line 101 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::getHessVec(), ROL::RiskMeasure< Real >::reset(), and ROL::RiskMeasure< Real >::update().
|
protected |
Definition at line 102 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::getGradient(), ROL::RiskMeasure< Real >::getHessVec(), and ROL::RiskMeasure< Real >::reset().
|
protected |
Definition at line 103 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::reset().
|
protected |
Definition at line 105 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::getComponent(), and ROL::RiskMeasure< Real >::setRiskVectorInfo().
|
protected |
Definition at line 106 of file ROL_RiskMeasure.hpp.
Referenced by ROL::RiskMeasure< Real >::getIndex(), and ROL::RiskMeasure< Real >::setRiskVectorInfo().