|
ROL
|
Provides an interface for the mean plus a sum of arbitrary order variances. More...
#include <ROL_MeanVariance.hpp>
Inheritance diagram for ROL::MeanVariance< Real >:Public Member Functions | |
| MeanVariance (const Real order, const Real coeff, const Teuchos::RCP< PositiveFunction< Real > > &pf) | |
| Constructor. More... | |
| MeanVariance (const std::vector< Real > &order, const std::vector< Real > &coeff, const Teuchos::RCP< PositiveFunction< Real > > &pf) | |
| Constructor. More... | |
| MeanVariance (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... | |
| Real | getValue (SampleGenerator< Real > &sampler) |
| Return risk measure value. More... | |
| void | update (const Real val, const Vector< Real > &g, const Real weight) |
| Update internal risk measure storage for gradient computation. More... | |
| void | getGradient (Vector< Real > &g, SampleGenerator< Real > &sampler) |
| Return risk measure (sub)gradient. 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... | |
| void | getHessVec (Vector< Real > &hv, SampleGenerator< Real > &sampler) |
| Return risk measure Hessian-times-a-vector. More... | |
Public Member Functions inherited from ROL::RiskMeasure< Real > | |
| virtual | ~RiskMeasure () |
| RiskMeasure (void) | |
Private Types | |
| typedef std::vector< Real >::size_type | uint |
Private Member Functions | |
| void | checkInputs (void) const |
Private Attributes | |
| Teuchos::RCP< PositiveFunction< Real > > | positiveFunction_ |
| Teuchos::RCP< Vector< Real > > | dualVector1_ |
| Teuchos::RCP< Vector< Real > > | dualVector2_ |
| Teuchos::RCP< Vector< Real > > | dualVector3_ |
| Teuchos::RCP< Vector< Real > > | dualVector4_ |
| std::vector< Real > | order_ |
| std::vector< Real > | coeff_ |
| uint | NumMoments_ |
| std::vector< Real > | weights_ |
| std::vector< Real > | value_storage_ |
| std::vector< Teuchos::RCP< Vector< Real > > > | gradient_storage_ |
| std::vector< Teuchos::RCP< Vector< Real > > > | hessvec_storage_ |
| std::vector< Real > | gradvec_storage_ |
| bool | firstReset_ |
Additional Inherited Members | |
Protected Attributes inherited from ROL::RiskMeasure< Real > | |
| 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 the mean plus a sum of arbitrary order variances.
The mean plus variances risk measure is
\[ \mathcal{R}(X) = \mathbb{E}[X] + \sum_{k=1}^n c_k \mathbb{E}[\wp(X-\mathbb{E}[X])^{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. When \(\wp(x) = |x|\), \(\mathcal{R}\) also violates monotonicity.
When using derivative-based optimization, the user can provide a smooth approximation of \((\cdot)_+\) using the ROL::PositiveFunction class.
Definition at line 79 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 80 of file ROL_MeanVariance.hpp.
|
inline |
Constructor.
| [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 risk measure with a single variance.
Definition at line 127 of file ROL_MeanVariance.hpp.
References ROL::MeanVariance< Real >::checkInputs().
|
inline |
Constructor.
| [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 risk measure with an arbitrary number of variances.
Definition at line 145 of file ROL_MeanVariance.hpp.
References ROL::MeanVariance< Real >::checkInputs().
|
inline |
Constructor.
| [in] | parlist | is a parameter list specifying inputs |
parlist should contain sublists "SOL"->"Risk Measure"->"Mean Plus Variance" and within the "Mean Plus Variance" sublist should have the following parameters
Definition at line 171 of file ROL_MeanVariance.hpp.
References ROL::MeanVariance< Real >::checkInputs().
|
inlineprivate |
Definition at line 102 of file ROL_MeanVariance.hpp.
Referenced by ROL::MeanVariance< Real >::MeanVariance().
|
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.
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 199 of file ROL_MeanVariance.hpp.
References ROL::RiskMeasure< Real >::reset().
Referenced by ROL::MeanVariance< 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, \(x\) carries \(x_0\) and any statistics (scalars) associated with the risk measure. Similarly, \(v\) carries \(v_0\) and any statistics (scalars) associated with the risk measure.
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 217 of file ROL_MeanVariance.hpp.
References ROL::RiskVector< Real >::getVector(), and ROL::MeanVariance< 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 |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 224 of file ROL_MeanVariance.hpp.
|
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 230 of file ROL_MeanVariance.hpp.
References ROL::MeanVariance< Real >::NumMoments_, and ROL::SampleGenerator< Real >::sumAll().
|
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 249 of file ROL_MeanVariance.hpp.
References ROL::Vector< Real >::clone().
|
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 260 of file ROL_MeanVariance.hpp.
References ROL::MeanVariance< Real >::NumMoments_, and ROL::SampleGenerator< Real >::sumAll().
|
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 286 of file ROL_MeanVariance.hpp.
References ROL::Vector< Real >::clone().
|
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 305 of file ROL_MeanVariance.hpp.
References ROL::MeanVariance< Real >::NumMoments_, ROL::SampleGenerator< Real >::sumAll(), and ROL::Vector< Real >::zero().
|
private |
Definition at line 83 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 85 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 86 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 87 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 88 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 90 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 91 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 92 of file ROL_MeanVariance.hpp.
Referenced by ROL::MeanVariance< Real >::getGradient(), ROL::MeanVariance< Real >::getHessVec(), and ROL::MeanVariance< Real >::getValue().
|
private |
Definition at line 94 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 95 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 96 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 97 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 98 of file ROL_MeanVariance.hpp.
|
private |
Definition at line 100 of file ROL_MeanVariance.hpp.
1.8.13