ROL
|
Provides an interface for the mean plus a sum of arbitrary order variances from targets. More...
#include <ROL_MeanVarianceFromTarget.hpp>
Public Member Functions | |
MeanVarianceFromTarget (const Real target, const Real order, const Real coeff, const ROL::Ptr< PositiveFunction< Real > > &pf) | |
Constructor. More... | |
MeanVarianceFromTarget (const std::vector< Real > &target, const std::vector< Real > &order, const std::vector< Real > &coeff, const ROL::Ptr< PositiveFunction< Real > > &pf) | |
Constructor. More... | |
MeanVarianceFromTarget (ROL::ParameterList &parlist) | |
Constructor. 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... | |
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... | |
virtual Real | getValue (const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler) |
Return risk measure value. More... | |
virtual 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... | |
virtual 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... | |
Private Types | |
typedef std::vector< Real > ::size_type | uint |
Private Member Functions | |
void | checkInputs (void) const |
Private Attributes | |
ROL::Ptr< PositiveFunction < Real > > | positiveFunction_ |
std::vector< Real > | target_ |
std::vector< Real > | order_ |
std::vector< Real > | coeff_ |
uint | NumMoments_ |
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 the mean plus a sum of arbitrary order variances from targets.
The mean plus variances from targets risk measure is
\[ \mathcal{R}(X) = \mathbb{E}[X] + \sum_{k=1}^n c_k \mathbb{E}[\wp(X-t_k)^{p_k}] \]
where \(\wp:\mathbb{R}\to[0,\infty)\) is either the absolute value or \((x)_+ = \max\{0,x\}\), \(c_k > 0\) and \(p_k\in\mathbb{N}\). \(\mathcal{R}\) is law-invariant, but not coherent since it violates positive homogeneity and translation equivariance.
When using derivative-based optimization, the user can provide a smooth approximation of \((\cdot)_+\) using the ROL::PositiveFunction class.
Definition at line 77 of file ROL_MeanVarianceFromTarget.hpp.
|
private |
Definition at line 78 of file ROL_MeanVarianceFromTarget.hpp.
|
inline |
Constructor.
[in] | target | is the scalar target |
[in] | order | is the variance order |
[in] | coeff | is the weight for variance term |
[in] | pf | is the plus function or an approximation |
This constructor produces a mean plus variance from target risk measure with a single variance.
Definition at line 126 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::checkInputs(), ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, and ROL::MeanVarianceFromTarget< Real >::target_.
|
inline |
Constructor.
[in] | target | is a vector of targets |
[in] | order | is a vector of variance orders |
[in] | coeff | is a vector of weights for the variance terms |
[in] | pf | is the plus function or an approximation |
This constructor produces a mean plus variance from target risk measure with an arbitrary number of variances.
Definition at line 146 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::checkInputs(), ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, and ROL::MeanVarianceFromTarget< Real >::target_.
|
inline |
Constructor.
[in] | parlist | is a parameter list specifying inputs |
parlist should contain sublists "SOL"->"Risk Measure"->"Mean Plus Variance From Target" and within the "Mean Plus Variance From Target" sublist should have the following parameters
Definition at line 177 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::checkInputs(), ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, and ROL::MeanVarianceFromTarget< Real >::target_.
|
inlineprivate |
Definition at line 100 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, and zero.
Referenced by ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget().
|
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 203 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::RandVarFunctional< Real >::computeValue(), ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, ROL::MeanVarianceFromTarget< Real >::target_, 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 217 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, ROL::MeanVarianceFromTarget< Real >::target_, 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 233 of file ROL_MeanVarianceFromTarget.hpp.
References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::RandVarFunctional< Real >::computeGradVec(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::hv_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, ROL::MeanVarianceFromTarget< Real >::target_, and ROL::RandVarFunctional< Real >::weight_.
|
private |
Definition at line 80 of file ROL_MeanVarianceFromTarget.hpp.
Referenced by ROL::MeanVarianceFromTarget< Real >::checkInputs(), ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget(), ROL::MeanVarianceFromTarget< Real >::updateGradient(), ROL::MeanVarianceFromTarget< Real >::updateHessVec(), and ROL::MeanVarianceFromTarget< Real >::updateValue().
|
private |
Definition at line 81 of file ROL_MeanVarianceFromTarget.hpp.
Referenced by ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget(), ROL::MeanVarianceFromTarget< Real >::updateGradient(), ROL::MeanVarianceFromTarget< Real >::updateHessVec(), and ROL::MeanVarianceFromTarget< Real >::updateValue().
|
private |
Definition at line 82 of file ROL_MeanVarianceFromTarget.hpp.
Referenced by ROL::MeanVarianceFromTarget< Real >::checkInputs(), ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget(), ROL::MeanVarianceFromTarget< Real >::updateGradient(), ROL::MeanVarianceFromTarget< Real >::updateHessVec(), and ROL::MeanVarianceFromTarget< Real >::updateValue().
|
private |
Definition at line 83 of file ROL_MeanVarianceFromTarget.hpp.
Referenced by ROL::MeanVarianceFromTarget< Real >::checkInputs(), ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget(), ROL::MeanVarianceFromTarget< Real >::updateGradient(), ROL::MeanVarianceFromTarget< Real >::updateHessVec(), and ROL::MeanVarianceFromTarget< Real >::updateValue().
|
private |
Definition at line 84 of file ROL_MeanVarianceFromTarget.hpp.
Referenced by ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget(), ROL::MeanVarianceFromTarget< Real >::updateGradient(), ROL::MeanVarianceFromTarget< Real >::updateHessVec(), and ROL::MeanVarianceFromTarget< Real >::updateValue().