ROL
|
Provides a general interface for error measures generated through the expectation risk quadrangle. More...
#include <ROL_ExpectationQuadError.hpp>
Public Member Functions | |
ExpectationQuadError (const Ptr< ExpectationQuad< Real >> &eq) | |
void | checkRegret (void) |
Run derivative tests for the scalar error function. More... | |
void | updateValue (Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol) |
Update internal storage for value computation. 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 | 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... | |
Real | getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler) |
Return risk measure value. 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 | 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 | initialize (const Vector< Real > &x) |
Initialize temporary variables. 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 Attributes | |
Ptr< ExpectationQuad< Real > > | eq_ |
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 a general interface for error measures generated through the expectation risk quadrangle.
The expectation risk quadrangle is a specialization of the general risk quadrangle that provides a rigorous connection between risk-averse optimization and statistical estimation. The risk quadrangle provides fundamental relationships between measures of risk, regret, error and deviation. An expectation risk quadrangle is defined through scalar regret and error functions. The scalar regret function, \(v:\mathbb{R}\to(-\infty,\infty]\), must be proper, closed, convex and satisfy \(v(0)=0\) and \(v(x) > x\) for all \(x\neq 0\). Similarly, the scalar error function, \(e:\mathbb{R}\to[0,\infty]\), must be proper, closed, convex and satisfy \(e(0)=0\) and \(e(x) > 0\) for all \(x\neq 0\). \(v\) and \(e\) are obtained from one another through the relations
\[ v(x) = e(x) + x \quad\text{and}\quad e(x) = v(x) - x. \]
Given \(v\) (or equivalently \(e\)), the associated risk measure is
\[ \mathcal{R}(X) = \inf_{t\in\mathbb{R}} \left\{ t + \mathbb{E}\left[v(X-t)\right] \right\}. \]
In general, \(\mathcal{R}\) is convex and translation equivariant. Moreover, \(\mathcal{R}\) is monotonic if \(v\) is increasing and \(\mathcal{R}\) is positive homogeneous if \(v\) is. ROL implements this by augmenting the optimization vector \(x_0\) with the parameter \(t\), then minimizes jointly for \((x_0,t)\).
Definition at line 89 of file ROL_ExpectationQuadError.hpp.
|
inline |
Definition at line 108 of file ROL_ExpectationQuadError.hpp.
|
inline |
Run derivative tests for the scalar error function.
Definition at line 113 of file ROL_ExpectationQuadError.hpp.
References ROL::ExpectationQuadError< Real >::eq_.
|
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 117 of file ROL_ExpectationQuadError.hpp.
References ROL::RandVarFunctional< Real >::computeValue(), ROL::ExpectationQuadError< Real >::eq_, ROL::RandVarFunctional< Real >::val_, and ROL::RandVarFunctional< Real >::weight_.
|
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 125 of file ROL_ExpectationQuadError.hpp.
References ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::ExpectationQuadError< Real >::eq_, ROL::RandVarFunctional< Real >::g_, and ROL::RandVarFunctional< Real >::weight_.
|
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 137 of file ROL_ExpectationQuadError.hpp.
References ROL::RandVarFunctional< Real >::computeGradVec(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::ExpectationQuadError< Real >::eq_, ROL::RandVarFunctional< Real >::hv_, 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 156 of file ROL_ExpectationQuadError.hpp.
References ROL::SampleGenerator< Real >::sumAll(), and ROL::RandVarFunctional< 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\).
Reimplemented from ROL::RandVarFunctional< Real >.
Definition at line 164 of file ROL_ExpectationQuadError.hpp.
References ROL::RandVarFunctional< 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\).
Reimplemented from ROL::RandVarFunctional< Real >.
Definition at line 172 of file ROL_ExpectationQuadError.hpp.
References ROL::RandVarFunctional< Real >::hv_, and ROL::SampleGenerator< Real >::sumAll().
|
private |