ROL
|
Provides a general interface for the F-divergence distributionally robust expectation. More...
#include <ROL_FDivergence.hpp>
Public Member Functions | |
FDivergence (const Real thresh) | |
Constructor. More... | |
FDivergence (Teuchos::ParameterList &parlist) | |
Constructor. More... | |
virtual Real | Fprimal (Real x, int deriv=0)=0 |
Implementation of the scalar primal F function. More... | |
virtual Real | Fdual (Real x, int deriv=0)=0 |
Implementation of the scalar dual F function. 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... | |
![]() | |
virtual | ~RiskMeasure () |
RiskMeasure (void) | |
Private Member Functions | |
void | checkInputs (void) const |
Private Attributes | |
Real | thresh_ |
Teuchos::RCP< Vector< Real > > | dualVector_ |
Real | xlam_ |
Real | xmu_ |
Real | vlam_ |
Real | vmu_ |
Real | valLam_ |
Real | valLam2_ |
Real | valMu_ |
Real | valMu2_ |
bool | firstReset_ |
Additional Inherited Members | |
![]() | |
Real | val_ |
Real | gv_ |
Teuchos::RCP< Vector< Real > > | g_ |
Teuchos::RCP< Vector< Real > > | hv_ |
Teuchos::RCP< Vector< Real > > | dualVector_ |
bool | firstReset_ |
Provides a general interface for the F-divergence distributionally robust expectation.
This class defines a risk measure \(\mathcal{R}\) which arises in distributionally robust stochastic programming. \(\mathcal{R}\) is given by
\[ \mathcal{R}(X) = \sup_{\vartheta\in\mathfrak{A}} \mathbb{E}[\vartheta X] \]
where \(\mathfrak{A}\) is called the ambiguity (or uncertainty) set and is defined by a constraint on the F-divergence, i.e.,
\[ \mathfrak{A} = \{\vartheta\in\mathcal{X}^*\,:\, \mathbb{E}[\vartheta] = 1,\; \vartheta \ge 0,\;\text{and}\; \mathbb{E}[F(\vartheta)] \le \epsilon\} \]
where \(F:\mathbb{R}\to[0,\infty]\) convex, lower semicontinuous and satisfies \(F(1) = 1\) and \(F(x) = \infty\) for \(x < 0\). \(\mathcal{R}\) is a law-invariant, coherent risk measure. Moreover, by a duality argument, \(\mathcal{R}\) can be reformulated as
\[ \mathcal{R}(X) = \inf_{\lambda > 0,\,\mu}\left\{ \lambda \epsilon + \mu + \mathbb{E}\left[ (\lambda F)^*(X-\mu)\right]\right\}. \]
Here, \((\lambda F)^*\) denotes the Legendre-Fenchel transformation of \((\lambda F)\). ROL implements this by augmenting the optimization vector \(x_0\) with the parameter \((\lambda,\mu)\), then minimizes jointly for \((x_0,\lambda,\mu)\).
Definition at line 88 of file ROL_FDivergence.hpp.
|
inline |
Constructor.
[in] | eps | is the tolerance for the F-divergence constraint |
Definition at line 118 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::checkInputs().
|
inline |
Constructor.
[in] | parlist | is a parameter list specifying inputs |
parlist should contain sublists "SOL"->"Risk Measure"->"F-Divergence" and within the "F-Divergence" sublist should have the following parameters
Definition at line 132 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::checkInputs(), and ROL::FDivergence< Real >::thresh_.
|
inlineprivate |
Definition at line 107 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::thresh_.
Referenced by ROL::FDivergence< Real >::FDivergence().
|
pure virtual |
Implementation of the scalar primal F function.
[in] | x | is a scalar input |
[in] | deriv | is the derivative order |
Upon return, Fprimal returns \(F(x)\) or a derivative of \(F(x)\).
Implemented in ROL::Chi2Divergence< Real >.
|
pure virtual |
Implementation of the scalar dual F function.
[in] | x | is a scalar input |
[in] | deriv | is the derivative order |
Upon return, Fdual returns \(F^*(x)\) or a derivative of \(F^*(x)\). Here, \(F^*\) denotes the Legendre-Fenchel transformation of \(F\), i.e.,
\[ F^*(y) = \sup_{x\in\mathbb{R}}\{xy - F(x)\}. \]
Implemented in ROL::Chi2Divergence< Real >.
Referenced by ROL::FDivergence< Real >::update().
|
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, \form#56 carries \form#323 and any statistics (scalars) associated with the risk measure. |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 164 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::dualVector_, ROL::FDivergence< Real >::firstReset_, ROL::RiskMeasure< Real >::reset(), ROL::FDivergence< Real >::valLam2_, ROL::FDivergence< Real >::valLam_, ROL::FDivergence< Real >::valMu2_, ROL::FDivergence< Real >::valMu_, ROL::FDivergence< Real >::xlam_, and ROL::FDivergence< Real >::xmu_.
Referenced by ROL::FDivergence< 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, \form#56 carries \form#323 and any statistics (scalars) associated with the risk measure. Similarly, \form#37 carries\(v_0\) and any statistics (scalars) associated with the risk measure. |
Reimplemented from ROL::RiskMeasure< Real >.
Definition at line 176 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::reset(), ROL::FDivergence< Real >::vlam_, and ROL::FDivergence< Real >::vmu_.
|
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 186 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::Fdual(), ROL::FDivergence< Real >::xlam_, and ROL::FDivergence< Real >::xmu_.
|
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 191 of file ROL_FDivergence.hpp.
References ROL::SampleGenerator< Real >::sumAll(), ROL::FDivergence< Real >::thresh_, ROL::FDivergence< Real >::xlam_, and ROL::FDivergence< Real >::xmu_.
|
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 198 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::Fdual(), ROL::FDivergence< Real >::valLam_, ROL::FDivergence< Real >::valMu_, ROL::FDivergence< Real >::xlam_, and ROL::FDivergence< Real >::xmu_.
|
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 209 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::dualVector_, ROL::RiskVector< Real >::setStatistic(), ROL::RiskVector< Real >::setVector(), ROL::SampleGenerator< Real >::sumAll(), ROL::FDivergence< Real >::thresh_, ROL::FDivergence< Real >::valLam_, and ROL::FDivergence< Real >::valMu_.
|
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 227 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::Fdual(), ROL::FDivergence< Real >::valLam2_, ROL::FDivergence< Real >::valLam_, ROL::FDivergence< Real >::valMu2_, ROL::FDivergence< Real >::valMu_, ROL::FDivergence< Real >::vlam_, ROL::FDivergence< Real >::vmu_, ROL::FDivergence< Real >::xlam_, and ROL::FDivergence< Real >::xmu_.
|
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 240 of file ROL_FDivergence.hpp.
References ROL::FDivergence< Real >::dualVector_, ROL::RiskVector< Real >::setStatistic(), ROL::RiskVector< Real >::setVector(), ROL::SampleGenerator< Real >::sumAll(), ROL::FDivergence< Real >::valLam2_, ROL::FDivergence< Real >::valLam_, ROL::FDivergence< Real >::valMu2_, ROL::FDivergence< Real >::valMu_, ROL::FDivergence< Real >::vlam_, ROL::FDivergence< Real >::vmu_, and ROL::FDivergence< Real >::xlam_.
|
private |
Definition at line 91 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::checkInputs(), ROL::FDivergence< Real >::FDivergence(), ROL::FDivergence< Real >::getGradient(), and ROL::FDivergence< Real >::getValue().
|
private |
Definition at line 93 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getGradient(), ROL::FDivergence< Real >::getHessVec(), and ROL::FDivergence< Real >::reset().
|
private |
Definition at line 95 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::getValue(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 96 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getValue(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 97 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 98 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 100 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getGradient(), ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 101 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 102 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getGradient(), ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 103 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::getHessVec(), ROL::FDivergence< Real >::reset(), and ROL::FDivergence< Real >::update().
|
private |
Definition at line 105 of file ROL_FDivergence.hpp.
Referenced by ROL::FDivergence< Real >::reset().