ROL
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ROL::ConvexCombinationRiskMeasure< Real > Class Template Reference

Provides an interface for a convex combination of risk measures. More...

#include <ROL_ConvexCombinationRiskMeasure.hpp>

+ Inheritance diagram for ROL::ConvexCombinationRiskMeasure< Real >:

Public Member Functions

 ConvexCombinationRiskMeasure (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

std::vector< Real > lambda_
 
std::vector< Teuchos::ParameterList > parlist_
 
std::vector< Teuchos::RCP< RiskMeasure< Real > > > risk_
 
uint size_
 
Teuchos::RCP< Vector< Real > > dualVector0_
 
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_
 

Detailed Description

template<class Real>
class ROL::ConvexCombinationRiskMeasure< Real >

Provides an interface for a convex combination of risk measures.

This function provides the capability to produce a convex combination of risk measure, i.e.,

\[ \mathcal{R}(X) = \sum_{k=1}^n \lambda_k \mathcal{R}_k(X) \]

where \(\mathcal{R}_k\) are risk measures and \(\lambda_k \ge 0\) with \(\lambda_1 + \ldots + \lambda_n = 1\). In general, \(\mathcal{R}\) is not law-invariant or coherent unless each \(\mathcal{R}_k\) is.

Definition at line 68 of file ROL_ConvexCombinationRiskMeasure.hpp.

Member Typedef Documentation

◆ uint

template<class Real >
typedef std::vector<Real>::size_type ROL::ConvexCombinationRiskMeasure< Real >::uint
private

Definition at line 70 of file ROL_ConvexCombinationRiskMeasure.hpp.

Constructor & Destructor Documentation

◆ ConvexCombinationRiskMeasure()

template<class Real >
ROL::ConvexCombinationRiskMeasure< Real >::ConvexCombinationRiskMeasure ( Teuchos::ParameterList &  parlist)
inline

Constructor.

Parameters
[in]parlistis a parameter list specifying inputs

parlist should contain sublists "SOL"->"Risk Measure"->"Convex Combination Risk Measure" and within the "Convex Combination Risk Measure" sublist should have the following parameters

  • "Convex Combination Parameters" (greater than 0 and sum to 1)
  • Sublists labeled 1 to n with risk measure definitions.

Definition at line 106 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::checkInputs(), ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::parlist_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

Member Function Documentation

◆ checkInputs()

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::checkInputs ( void  ) const
inlineprivate

◆ reset() [1/2]

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::reset ( Teuchos::RCP< Vector< Real > > &  x0,
const Vector< Real > &  x 
)
inlinevirtual

Reset internal risk measure storage. Called for value and gradient computation.

Parameters
[out]x0is a user-provided optimization vector
[in]xis 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 132 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::dualVector0_, ROL::ConvexCombinationRiskMeasure< Real >::firstReset_, ROL::RiskVector< Real >::getStatistic(), ROL::RiskVector< Real >::getVector(), ROL::ConvexCombinationRiskMeasure< Real >::parlist_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::RiskVector< Real >::setStatistic(), and ROL::ConvexCombinationRiskMeasure< Real >::size_.

Referenced by ROL::ConvexCombinationRiskMeasure< Real >::reset().

◆ reset() [2/2]

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::reset ( Teuchos::RCP< Vector< Real > > &  x0,
const Vector< Real > &  x,
Teuchos::RCP< Vector< Real > > &  v0,
const Vector< Real > &  v 
)
inlinevirtual

Reset internal risk measure storage. Called for Hessian-times-a-vector computation.

Parameters
[out]x0is a user-provided optimization vector
[in]xis a (potentially) augmented risk vector
[out]v0is a user-provided direction vector
[in]vis 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 161 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::dualVector0_, ROL::ConvexCombinationRiskMeasure< Real >::firstReset_, ROL::RiskVector< Real >::getStatistic(), ROL::RiskVector< Real >::getVector(), ROL::ConvexCombinationRiskMeasure< Real >::parlist_, ROL::ConvexCombinationRiskMeasure< Real >::reset(), ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::RiskVector< Real >::setStatistic(), and ROL::ConvexCombinationRiskMeasure< Real >::size_.

◆ update() [1/3]

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::update ( const Real  val,
const Real  weight 
)
inlinevirtual

Update internal risk measure storage for value computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RiskMeasure< Real >.

Definition at line 199 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

◆ getValue()

template<class Real >
Real ROL::ConvexCombinationRiskMeasure< Real >::getValue ( SampleGenerator< Real > &  sampler)
inlinevirtual

Return risk measure value.

Parameters
[in]sampleris 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 205 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

◆ update() [2/3]

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::update ( const Real  val,
const Vector< Real > &  g,
const Real  weight 
)
inlinevirtual

Update internal risk measure storage for gradient computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]gis the gradient of the random variable objective function at the current sample point
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RiskMeasure< Real >.

Definition at line 213 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

◆ getGradient()

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::getGradient ( Vector< Real > &  g,
SampleGenerator< Real > &  sampler 
)
inlinevirtual

Return risk measure (sub)gradient.

Parameters
[out]gis the (sub)gradient of the risk measure
[in]sampleris 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 219 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::dualVector0_, ROL::RiskVector< Real >::getStatistic(), ROL::RiskVector< Real >::getVector(), ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::parlist_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::RiskVector< Real >::setStatistic(), ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::Vector< Real >::zero().

◆ update() [3/3]

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::update ( const Real  val,
const Vector< Real > &  g,
const Real  gv,
const Vector< Real > &  hv,
const Real  weight 
)
inlinevirtual

Update internal risk measure storage for Hessian-time-a-vector computation.

Parameters
[in]valis the value of the random variable objective function at the current sample point
[in]gis the gradient of the random variable objective function at the current sample point
[in]gvis the gradient of the random variable objective function at the current sample point applied to the vector v0
[in]hvis the Hessian of the random variable objective function at the current sample point applied to the vector v0
[in]weightis the weight associated with the current sample point

Reimplemented from ROL::RiskMeasure< Real >.

Definition at line 236 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::risk_, and ROL::ConvexCombinationRiskMeasure< Real >::size_.

◆ getHessVec()

template<class Real >
void ROL::ConvexCombinationRiskMeasure< Real >::getHessVec ( Vector< Real > &  hv,
SampleGenerator< Real > &  sampler 
)
inlinevirtual

Return risk measure Hessian-times-a-vector.

Parameters
[out]hvis the Hessian-times-a-vector of the risk measure
[in]sampleris 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 243 of file ROL_ConvexCombinationRiskMeasure.hpp.

References ROL::ConvexCombinationRiskMeasure< Real >::dualVector0_, ROL::RiskVector< Real >::getStatistic(), ROL::RiskVector< Real >::getVector(), ROL::ConvexCombinationRiskMeasure< Real >::lambda_, ROL::ConvexCombinationRiskMeasure< Real >::parlist_, ROL::ConvexCombinationRiskMeasure< Real >::risk_, ROL::RiskVector< Real >::setStatistic(), ROL::ConvexCombinationRiskMeasure< Real >::size_, and ROL::Vector< Real >::zero().

Member Data Documentation

◆ lambda_

template<class Real >
std::vector<Real> ROL::ConvexCombinationRiskMeasure< Real >::lambda_
private

◆ parlist_

template<class Real >
std::vector<Teuchos::ParameterList> ROL::ConvexCombinationRiskMeasure< Real >::parlist_
private

◆ risk_

template<class Real >
std::vector<Teuchos::RCP<RiskMeasure<Real> > > ROL::ConvexCombinationRiskMeasure< Real >::risk_
private

◆ size_

template<class Real >
uint ROL::ConvexCombinationRiskMeasure< Real >::size_
private

◆ dualVector0_

template<class Real >
Teuchos::RCP<Vector<Real> > ROL::ConvexCombinationRiskMeasure< Real >::dualVector0_
private

◆ firstReset_

template<class Real >
bool ROL::ConvexCombinationRiskMeasure< Real >::firstReset_
private

The documentation for this class was generated from the following file: