ROL
|
#include <ROL_PD_MeanSemiDeviationFromTarget.hpp>
Public Member Functions | |
PD_MeanSemiDeviationFromTarget (const Real coeff, const Real target) | |
void | setStorage (const Ptr< ScalarController< Real >> &value_storage, const Ptr< VectorController< Real >> &gradient_storage) |
void | setHessVecStorage (const Ptr< ScalarController< Real >> &gradvec_storage, const Ptr< VectorController< Real >> &hessvec_storage) |
void | initialize (const Vector< Real > &x) |
Initialize temporary variables. 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::PD_RandVarFunctional< Real > | |
PD_RandVarFunctional (void) | |
void | setData (SampleGenerator< Real > &sampler, const Real pen, const Real lam=0.0) |
virtual Real | computeDual (SampleGenerator< Real > &sampler) |
void | updateDual (SampleGenerator< Real > &sampler) |
void | updatePenalty (const Real pen) |
Public Member Functions inherited from ROL::RandVarFunctional< Real > | |
virtual | ~RandVarFunctional () |
RandVarFunctional (void) | |
weight_ (0) | |
void | useStorage (bool storage) |
void | useHessVecStorage (bool 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) |
virtual Real | computeStatistic (const Ptr< const std::vector< Real >> &xstat) const |
Compute statistic. More... | |
Private Member Functions | |
void | initializeStorage (void) |
void | clear (void) |
void | checkInputs (void) |
Private Attributes | |
Real | coeff_ |
Real | target_ |
Ptr< ScalarController< Real > > | values_ |
Ptr< ScalarController< Real > > | gradvecs_ |
Ptr< VectorController< Real > > | gradients_ |
Ptr< VectorController< Real > > | hessvecs_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::PD_RandVarFunctional< Real > | |
void | setValue (const Real val, const std::vector< Real > &pt) |
void | getMultiplier (Real &lam, const std::vector< Real > &pt) const |
void | setMultiplier (Real &lam, const std::vector< Real > &pt) |
Real | getPenaltyParameter (void) const |
Real | ppf (const Real x, const Real t, const Real r, const int deriv=0) const |
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_ |
Definition at line 18 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
|
inline |
Definition at line 70 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::checkInputs().
|
inlineprivate |
Definition at line 47 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::gradients_, ROL::PD_MeanSemiDeviationFromTarget< Real >::gradvecs_, ROL::PD_MeanSemiDeviationFromTarget< Real >::hessvecs_, ROL::RandVarFunctional< Real >::setHessVecStorage(), ROL::RandVarFunctional< Real >::setStorage(), and ROL::PD_MeanSemiDeviationFromTarget< Real >::values_.
Referenced by ROL::PD_MeanSemiDeviationFromTarget< Real >::checkInputs().
|
inlineprivate |
Definition at line 57 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::gradvecs_, and ROL::PD_MeanSemiDeviationFromTarget< Real >::hessvecs_.
Referenced by ROL::PD_MeanSemiDeviationFromTarget< Real >::initialize().
|
inlineprivate |
Definition at line 62 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::coeff_, ROL::PD_MeanSemiDeviationFromTarget< Real >::initializeStorage(), and zero.
Referenced by ROL::PD_MeanSemiDeviationFromTarget< Real >::PD_MeanSemiDeviationFromTarget().
|
inlinevirtual |
Reimplemented from ROL::PD_RandVarFunctional< Real >.
Definition at line 75 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::gradients_, ROL::PD_RandVarFunctional< Real >::setStorage(), and ROL::PD_MeanSemiDeviationFromTarget< Real >::values_.
|
inlinevirtual |
Reimplemented from ROL::PD_RandVarFunctional< Real >.
Definition at line 82 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::gradvecs_, ROL::PD_MeanSemiDeviationFromTarget< Real >::hessvecs_, and ROL::PD_RandVarFunctional< Real >::setHessVecStorage().
|
inlinevirtual |
Initialize temporary variables.
[in] | x | is a vector used for initializing storage |
Reimplemented from ROL::PD_RandVarFunctional< Real >.
Definition at line 89 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::clear(), and ROL::PD_RandVarFunctional< Real >::initialize().
|
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 94 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::coeff_, ROL::RandVarFunctional< Real >::computeValue(), ROL::PD_RandVarFunctional< Real >::getMultiplier(), ROL::PD_RandVarFunctional< Real >::getPenaltyParameter(), ROL::RandVarFunctional< Real >::point_, ROL::PD_RandVarFunctional< Real >::ppf(), ROL::PD_RandVarFunctional< Real >::setValue(), ROL::PD_MeanSemiDeviationFromTarget< Real >::target_, 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 107 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References 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 115 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::coeff_, ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::RandVarFunctional< Real >::g_, ROL::PD_RandVarFunctional< Real >::getMultiplier(), ROL::PD_RandVarFunctional< Real >::getPenaltyParameter(), ROL::RandVarFunctional< Real >::point_, ROL::PD_RandVarFunctional< Real >::ppf(), ROL::PD_MeanSemiDeviationFromTarget< Real >::target_, 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 129 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::RandVarFunctional< Real >::g_, 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::RandVarFunctional< Real >.
Definition at line 137 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::PD_MeanSemiDeviationFromTarget< Real >::coeff_, ROL::RandVarFunctional< Real >::computeGradVec(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::RandVarFunctional< Real >::dualVector_, ROL::PD_RandVarFunctional< Real >::getMultiplier(), ROL::PD_RandVarFunctional< Real >::getPenaltyParameter(), ROL::RandVarFunctional< Real >::hv_, ROL::RandVarFunctional< Real >::point_, ROL::PD_RandVarFunctional< Real >::ppf(), ROL::PD_MeanSemiDeviationFromTarget< Real >::target_, ROL::RandVarFunctional< Real >::weight_, and zero.
|
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 158 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
References ROL::RandVarFunctional< Real >::hv_, and ROL::SampleGenerator< Real >::sumAll().
|
private |
Definition at line 20 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
Referenced by ROL::PD_MeanSemiDeviationFromTarget< Real >::checkInputs(), ROL::PD_MeanSemiDeviationFromTarget< Real >::updateGradient(), ROL::PD_MeanSemiDeviationFromTarget< Real >::updateHessVec(), and ROL::PD_MeanSemiDeviationFromTarget< Real >::updateValue().
|
private |
|
private |
Definition at line 23 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
Referenced by ROL::PD_MeanSemiDeviationFromTarget< Real >::initializeStorage(), and ROL::PD_MeanSemiDeviationFromTarget< Real >::setStorage().
|
private |
|
private |
Definition at line 25 of file ROL_PD_MeanSemiDeviationFromTarget.hpp.
Referenced by ROL::PD_MeanSemiDeviationFromTarget< Real >::initializeStorage(), and ROL::PD_MeanSemiDeviationFromTarget< Real >::setStorage().
|
private |