ROL
|
Provides an interface for a convex combination of the expected value and the conditional value-at-risk. More...
#include <ROL_CVaR.hpp>
Public Member Functions | |
CVaR (const Real prob, const Real coeff, const Teuchos::RCP< PlusFunction< Real > > &pf) | |
Constructor. More... | |
CVaR (Teuchos::ParameterList &parlist) | |
Constructor. More... | |
void | reset (Teuchos::RCP< Vector< Real > > &x0, const Vector< Real > &x) |
Reset internal risk measure storage. Called for value and gradient computation. More... | |
void | reset (Teuchos::RCP< Vector< Real > > &x0, const Vector< Real > &x, Teuchos::RCP< Vector< Real > > &v0, const Vector< Real > &v) |
Reset internal risk measure storage. Called for Hessian-times-a-vector computation. More... | |
void | update (const Real val, const Real weight) |
Update internal risk measure storage for value computation. More... | |
void | update (const Real val, const Vector< Real > &g, const Real weight) |
Update internal risk measure storage for gradient computation. More... | |
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... | |
Real | getValue (SampleGenerator< Real > &sampler) |
Return risk measure value. More... | |
void | getGradient (Vector< Real > &g, SampleGenerator< Real > &sampler) |
Return risk measure (sub)gradient. More... | |
void | getHessVec (Vector< Real > &hv, SampleGenerator< Real > &sampler) |
Return risk measure Hessian-times-a-vector. More... | |
![]() | |
virtual | ~RiskMeasure () |
RiskMeasure (void) | |
Private Member Functions | |
void | checkInputs (void) const |
Private Attributes | |
Teuchos::RCP< PlusFunction< Real > > | plusFunction_ |
Real | prob_ |
Real | coeff_ |
Teuchos::RCP< Vector< Real > > | dualVector_ |
Real | xvar_ |
Real | vvar_ |
bool | firstReset_ |
Additional Inherited Members | |
![]() | |
Real | val_ |
Real | gv_ |
Teuchos::RCP< Vector< Real > > | g_ |
Teuchos::RCP< Vector< Real > > | hv_ |
Teuchos::RCP< Vector< Real > > | dualVector_ |
bool | firstReset_ |
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 79 of file ROL_CVaR.hpp.
|
inline |
Constructor.
[in] | prob | is the confidence level |
[in] | coeff | is the convex combination parameter (coeff=0 corresponds to the expected value whereas coeff=1 corresponds to the conditional value-at-risk) |
[in] | pf | is the plus function or an approximation |
Definition at line 112 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::checkInputs().
Constructor.
[in] | parlist | is a parameter list specifying inputs |
parlist should contain sublists "SOL"->"Risk Measure"->"CVaR" and within the "CVaR" sublist should have the following parameters
Definition at line 129 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::checkInputs(), ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::plusFunction_, and ROL::CVaR< Real >::prob_.
|
inlineprivate |
Definition at line 92 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::plusFunction_, and ROL::CVaR< Real >::prob_.
Referenced by ROL::CVaR< Real >::CVaR().
|
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, \form#56 carries \form#323 and any statistics (scalars) associated with the risk measure. |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 142 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::dualVector_, ROL::CVaR< Real >::firstReset_, ROL::RiskMeasure< Real >::reset(), and ROL::CVaR< Real >::xvar_.
Referenced by ROL::CVaR< Real >::reset().
|
inlinevirtual |
Reset internal risk measure storage. Called for Hessian-times-a-vector computation.
[out] | x0 | is a user-provided optimization vector |
[in] | x | is a (potentially) augmented risk vector |
[out] | v0 | is a user-provided direction vector |
[in] | v | is a (potentially) augmented risk vector On input, \form#56 carries \form#323 and any statistics (scalars) associated with the risk measure. Similarly, \form#37 carries\(v_0\) and any statistics (scalars) associated with the risk measure. |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 152 of file ROL_CVaR.hpp.
References ROL::RiskVector< Real >::getStatistic(), ROL::RiskVector< Real >::getVector(), ROL::CVaR< Real >::reset(), and ROL::CVaR< Real >::vvar_.
|
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 |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 160 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::plusFunction_, ROL::CVaR< Real >::prob_, and ROL::CVaR< Real >::xvar_.
|
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 |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 166 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::plusFunction_, ROL::CVaR< Real >::prob_, and ROL::CVaR< Real >::xvar_.
|
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 |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 174 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::plusFunction_, ROL::CVaR< Real >::prob_, ROL::CVaR< Real >::vvar_, and ROL::CVaR< Real >::xvar_.
|
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\).
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 186 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::SampleGenerator< Real >::sumAll(), and ROL::CVaR< Real >::xvar_.
|
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\).
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 193 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::dualVector_, ROL::CVaR< Real >::prob_, ROL::RiskVector< Real >::setStatistic(), ROL::RiskVector< Real >::setVector(), 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\).
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 205 of file ROL_CVaR.hpp.
References ROL::CVaR< Real >::coeff_, ROL::CVaR< Real >::dualVector_, ROL::CVaR< Real >::prob_, ROL::RiskVector< Real >::setStatistic(), ROL::RiskVector< Real >::setVector(), and ROL::SampleGenerator< Real >::sumAll().
|
private |
Definition at line 81 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::checkInputs(), ROL::CVaR< Real >::CVaR(), and ROL::CVaR< Real >::update().
|
private |
Definition at line 83 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::checkInputs(), ROL::CVaR< Real >::CVaR(), ROL::CVaR< Real >::getGradient(), ROL::CVaR< Real >::getHessVec(), and ROL::CVaR< Real >::update().
|
private |
Definition at line 84 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::checkInputs(), ROL::CVaR< Real >::CVaR(), ROL::CVaR< Real >::getGradient(), ROL::CVaR< Real >::getHessVec(), ROL::CVaR< Real >::getValue(), and ROL::CVaR< Real >::update().
Definition at line 86 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::getGradient(), ROL::CVaR< Real >::getHessVec(), and ROL::CVaR< Real >::reset().
|
private |
Definition at line 87 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::getValue(), ROL::CVaR< Real >::reset(), and ROL::CVaR< Real >::update().
|
private |
Definition at line 88 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::reset(), and ROL::CVaR< Real >::update().
|
private |
Definition at line 90 of file ROL_CVaR.hpp.
Referenced by ROL::CVaR< Real >::reset().