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

Provides an interface for the mean plus a sum of arbitrary order variances from targets. More...

#include <ROL_MeanVarianceFromTarget.hpp>

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

Public Member Functions

 MeanVarianceFromTarget (const Real target, const Real order, const Real coeff, const Teuchos::RCP< PositiveFunction< Real > > &pf)
 Constructor. More...
 
 MeanVarianceFromTarget (const std::vector< Real > &target, const std::vector< Real > &order, const std::vector< Real > &coeff, const Teuchos::RCP< PositiveFunction< Real > > &pf)
 Constructor. More...
 
 MeanVarianceFromTarget (Teuchos::ParameterList &parlist)
 Constructor. More...
 
void update (const Real val, const Real weight)
 Update internal risk measure storage for value computation. More...
 
void update (const Real val, const Vector< Real > &g, const Real weight)
 Update internal risk measure storage for gradient computation. 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...
 
- Public Member Functions inherited from ROL::RiskMeasure< Real >
virtual ~RiskMeasure ()
 
 RiskMeasure (void)
 
virtual void reset (Teuchos::RCP< Vector< Real > > &x0, const Vector< Real > &x)
 Reset internal risk measure storage. Called for value and gradient computation. More...
 
virtual 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...
 
virtual Real getValue (SampleGenerator< Real > &sampler)
 Return risk measure value. More...
 
virtual void getGradient (Vector< Real > &g, SampleGenerator< Real > &sampler)
 Return risk measure (sub)gradient. More...
 
virtual void getHessVec (Vector< Real > &hv, 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

Teuchos::RCP< PositiveFunction< Real > > positiveFunction_
 
std::vector< Real > target_
 
std::vector< Real > order_
 
std::vector< Real > coeff_
 
uint NumMoments_
 

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::MeanVarianceFromTarget< Real >

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 78 of file ROL_MeanVarianceFromTarget.hpp.

Member Typedef Documentation

◆ uint

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

Definition at line 79 of file ROL_MeanVarianceFromTarget.hpp.

Constructor & Destructor Documentation

◆ MeanVarianceFromTarget() [1/3]

template<class Real >
ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget ( const Real  target,
const Real  order,
const Real  coeff,
const Teuchos::RCP< PositiveFunction< Real > > &  pf 
)
inline

Constructor.

Parameters
[in]targetis the scalar target
[in]orderis the variance order
[in]coeffis the weight for variance term
[in]pfis the plus function or an approximation

This constructor produces a mean plus variance from target risk measure with a single variance.

Definition at line 115 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_.

◆ MeanVarianceFromTarget() [2/3]

template<class Real >
ROL::MeanVarianceFromTarget< Real >::MeanVarianceFromTarget ( const std::vector< Real > &  target,
const std::vector< Real > &  order,
const std::vector< Real > &  coeff,
const Teuchos::RCP< PositiveFunction< Real > > &  pf 
)
inline

Constructor.

Parameters
[in]targetis a vector of targets
[in]orderis a vector of variance orders
[in]coeffis a vector of weights for the variance terms
[in]pfis 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 135 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_.

◆ MeanVarianceFromTarget() [3/3]

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

Constructor.

Parameters
[in]parlistis 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

  • "Targets" (array of scalars)
  • "Orders" (array of unsigned integers)
  • "Coefficients" (array of positive scalars)
  • "Deviation Type" (eighter "Upper" or "Absolute")
  • A sublist for positive function information.

Definition at line 166 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_.

Member Function Documentation

◆ checkInputs()

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

◆ update() [1/3]

template<class Real >
void ROL::MeanVarianceFromTarget< 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 197 of file ROL_MeanVarianceFromTarget.hpp.

References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, and ROL::MeanVarianceFromTarget< Real >::target_.

◆ update() [2/3]

template<class Real >
void ROL::MeanVarianceFromTarget< 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 207 of file ROL_MeanVarianceFromTarget.hpp.

References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, and ROL::MeanVarianceFromTarget< Real >::target_.

◆ update() [3/3]

template<class Real >
void ROL::MeanVarianceFromTarget< 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 218 of file ROL_MeanVarianceFromTarget.hpp.

References ROL::MeanVarianceFromTarget< Real >::coeff_, ROL::MeanVarianceFromTarget< Real >::NumMoments_, ROL::MeanVarianceFromTarget< Real >::order_, ROL::MeanVarianceFromTarget< Real >::positiveFunction_, and ROL::MeanVarianceFromTarget< Real >::target_.

Member Data Documentation

◆ positiveFunction_

template<class Real >
Teuchos::RCP<PositiveFunction<Real> > ROL::MeanVarianceFromTarget< Real >::positiveFunction_
private

◆ target_

template<class Real >
std::vector<Real> ROL::MeanVarianceFromTarget< Real >::target_
private

◆ order_

template<class Real >
std::vector<Real> ROL::MeanVarianceFromTarget< Real >::order_
private

◆ coeff_

template<class Real >
std::vector<Real> ROL::MeanVarianceFromTarget< Real >::coeff_
private

◆ NumMoments_

template<class Real >
uint ROL::MeanVarianceFromTarget< Real >::NumMoments_
private

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