ROL
|
Provides an interface for a convex combination of conditional value-at-risks. More...
#include <ROL_MixedCVaR.hpp>
Public Member Functions | |
MixedCVaR (ROL::ParameterList &parlist) | |
MixedCVaR (const std::vector< Real > &prob, const std::vector< Real > &coeff, const ROL::Ptr< PlusFunction< Real > > &pf) | |
void | initialize (const Vector< Real > &x) |
Initialize temporary variables. More... | |
Real | computeStatistic (const Ptr< const std::vector< Real >> &xstat) const override |
Compute statistic. 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 void | resetStorage (bool flag=true) |
Reset internal storage. More... | |
virtual void | resetStorage (UpdateType type) |
virtual void | setSample (const std::vector< Real > &point, const Real weight) |
Private Member Functions | |
void | initializeMCVAR (void) |
void | checkInputs (void) |
Private Attributes | |
ROL::Ptr< PlusFunction< Real > > | plusFunction_ |
std::vector< Real > | prob_ |
std::vector< Real > | coeff_ |
std::vector< Real > | vec_ |
int | size_ |
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_ |
Provides an interface for a convex combination of conditional value-at-risks.
The risk measure associated with the mixed-quantile quadrangle is defined as
\[ \mathcal{R}(X) = \lambda_1 \mathrm{CVaR}_{\beta_1}(X) + \ldots + \lambda_n \mathrm{CVaR}_{\beta_n}(X) \]
where \(0 \le \beta_1 \le \cdots \le \beta_n < 1\) and \(0 \le \lambda_i\), \(i=1,\ldots,n\), satisfies
\[ \lambda_1 + \ldots + \lambda_n = 1. \]
Here, the conditional value-at-risk (CVaR) with confidence level \(0\le \beta < 1\) is
\[ \mathrm{CVaR}_\beta(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 \(\mathrm{CVaR}_{\beta}(X)\) 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.
When using derivative-based optimization, the user can provide a smooth approximation of \((\cdot)_+\) using the ROL::PlusFunction class.
Definition at line 54 of file ROL_MixedCVaR.hpp.
|
inline |
Definition at line 102 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::checkInputs(), ROL::MixedCVaR< Real >::coeff_, ROL::MixedCVaR< Real >::plusFunction_, and ROL::MixedCVaR< Real >::prob_.
|
inline |
Definition at line 114 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::checkInputs().
|
inlineprivate |
Definition at line 76 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::prob_, ROL::MixedCVaR< Real >::size_, and ROL::MixedCVaR< Real >::vec_.
Referenced by ROL::MixedCVaR< Real >::checkInputs().
|
inlineprivate |
Definition at line 81 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, ROL::MixedCVaR< Real >::initializeMCVAR(), ROL::MixedCVaR< Real >::plusFunction_, ROL::MixedCVaR< Real >::prob_, and zero.
Referenced by ROL::MixedCVaR< Real >::MixedCVaR().
|
inlinevirtual |
Initialize temporary variables.
[in] | x | is a vector used for initializing storage |
Reimplemented from ROL::RandVarFunctional< Real >.
Definition at line 121 of file ROL_MixedCVaR.hpp.
References ROL::RandVarFunctional< Real >::initialize(), ROL::MixedCVaR< Real >::size_, and ROL::MixedCVaR< Real >::vec_.
|
inlineoverridevirtual |
Compute statistic.
[in] | xstat | is a ROL::Ptr to a std::vector containing the statistic vector |
Reimplemented from ROL::RandVarFunctional< Real >.
Definition at line 126 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, and ROL::MixedCVaR< Real >::size_.
|
inlinevirtual |
Update internal 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::RandVarFunctional< Real >.
Definition at line 136 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, ROL::RandVarFunctional< Real >::computeValue(), ROL::MixedCVaR< Real >::plusFunction_, ROL::MixedCVaR< Real >::prob_, ROL::MixedCVaR< Real >::size_, ROL::RandVarFunctional< Real >::val_, and ROL::RandVarFunctional< Real >::weight_.
|
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::RandVarFunctional< Real >.
Definition at line 148 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, ROL::MixedCVaR< Real >::size_, ROL::SampleGenerator< Real >::sumAll(), and ROL::RandVarFunctional< 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 |
Reimplemented from ROL::RandVarFunctional< Real >.
Definition at line 159 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::MixedCVaR< Real >::plusFunction_, ROL::MixedCVaR< Real >::prob_, ROL::MixedCVaR< Real >::size_, ROL::MixedCVaR< Real >::vec_, and ROL::RandVarFunctional< Real >::weight_.
|
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::RandVarFunctional< Real >.
Definition at line 176 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, ROL::RandVarFunctional< Real >::g_, ROL::MixedCVaR< Real >::size_, ROL::SampleGenerator< Real >::sumAll(), and ROL::MixedCVaR< Real >::vec_.
|
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::RandVarFunctional< Real >.
Definition at line 188 of file ROL_MixedCVaR.hpp.
References ROL::MixedCVaR< Real >::coeff_, ROL::RandVarFunctional< Real >::computeGradVec(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::hv_, ROL::MixedCVaR< Real >::plusFunction_, ROL::MixedCVaR< Real >::prob_, ROL::MixedCVaR< Real >::size_, ROL::MixedCVaR< Real >::vec_, and ROL::RandVarFunctional< Real >::weight_.
|
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::RandVarFunctional< Real >.
Definition at line 213 of file ROL_MixedCVaR.hpp.
References ROL::RandVarFunctional< Real >::hv_, ROL::MixedCVaR< Real >::size_, ROL::SampleGenerator< Real >::sumAll(), and ROL::MixedCVaR< Real >::vec_.
|
private |
Definition at line 56 of file ROL_MixedCVaR.hpp.
Referenced by ROL::MixedCVaR< Real >::checkInputs(), ROL::MixedCVaR< Real >::MixedCVaR(), ROL::MixedCVaR< Real >::updateGradient(), ROL::MixedCVaR< Real >::updateHessVec(), and ROL::MixedCVaR< Real >::updateValue().
|
private |
Definition at line 57 of file ROL_MixedCVaR.hpp.
Referenced by ROL::MixedCVaR< Real >::checkInputs(), ROL::MixedCVaR< Real >::initializeMCVAR(), ROL::MixedCVaR< Real >::MixedCVaR(), ROL::MixedCVaR< Real >::updateGradient(), ROL::MixedCVaR< Real >::updateHessVec(), and ROL::MixedCVaR< Real >::updateValue().
|
private |
Definition at line 58 of file ROL_MixedCVaR.hpp.
Referenced by ROL::MixedCVaR< Real >::checkInputs(), ROL::MixedCVaR< Real >::computeStatistic(), ROL::MixedCVaR< Real >::getGradient(), ROL::MixedCVaR< Real >::getValue(), ROL::MixedCVaR< Real >::MixedCVaR(), ROL::MixedCVaR< Real >::updateGradient(), ROL::MixedCVaR< Real >::updateHessVec(), and ROL::MixedCVaR< Real >::updateValue().
|
private |
Definition at line 59 of file ROL_MixedCVaR.hpp.
Referenced by ROL::MixedCVaR< Real >::getGradient(), ROL::MixedCVaR< Real >::getHessVec(), ROL::MixedCVaR< Real >::initialize(), ROL::MixedCVaR< Real >::initializeMCVAR(), ROL::MixedCVaR< Real >::updateGradient(), and ROL::MixedCVaR< Real >::updateHessVec().
|
private |
Definition at line 60 of file ROL_MixedCVaR.hpp.
Referenced by ROL::MixedCVaR< Real >::computeStatistic(), ROL::MixedCVaR< Real >::getGradient(), ROL::MixedCVaR< Real >::getHessVec(), ROL::MixedCVaR< Real >::getValue(), ROL::MixedCVaR< Real >::initialize(), ROL::MixedCVaR< Real >::initializeMCVAR(), ROL::MixedCVaR< Real >::updateGradient(), ROL::MixedCVaR< Real >::updateHessVec(), and ROL::MixedCVaR< Real >::updateValue().