10 #ifndef PH_REGRETOBJECTIVE_H
11 #define PH_REGRETOBJECTIVE_H
27 const Ptr<Objective<Real>>
obj_;
28 Ptr<ExpectationQuad<Real>>
quad_;
58 ParameterList &parlist)
63 std::string regret = parlist.sublist(
"SOL").sublist(
"Regret Measure").get(
"Name",
"Mean Absolute Loss");
67 quad_ = makePtr<QuantileQuadrangle<Real>>(parlist);
break;
69 quad_ = makePtr<MoreauYosidaCVaR<Real>>(parlist);
break;
71 quad_ = makePtr<GenMoreauYosidaCVaR<Real>>(parlist);
break;
73 quad_ = makePtr<LogExponentialQuadrangle<Real>>(parlist);
break;
75 quad_ = makePtr<MeanVarianceQuadrangle<Real>>(parlist);
break;
77 quad_ = makePtr<TruncatedMeanQuadrangle<Real>>(parlist);
break;
79 quad_ = makePtr<LogQuantileQuadrangle<Real>>(parlist);
break;
81 quad_ = makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist);
break;
83 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
84 "Invalid regret measure type " << regret <<
"!");
89 obj_->update(x,flag,iter);
114 obj_->hessVec(hv,v,x,tol);
119 obj_->setParameter(param);
Ptr< ExpectationQuad< Real > > quad_
PH_RegretObjective(const Ptr< Objective< Real >> &obj, ParameterList &parlist)
Provides the interface to evaluate objective functions.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
virtual void scale(const Real alpha)=0
Compute where .
virtual Real apply(const Vector< Real > &x) const
Apply to a dual vector. This is equivalent to the call .
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
bool isGradientInitialized_
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update objective function.
void setParameter(const std::vector< Real > ¶m)
Defines the linear algebra or vector space interface.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
ERegretMeasure StringToERegretMeasure(std::string s)
Provides the interface for the progressive hedging regret objective.
virtual void setParameter(const std::vector< Real > ¶m)
void getGradient(const Vector< Real > &x, Real &tol)
const Ptr< Objective< Real > > obj_
virtual void set(const Vector &x)
Set where .
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
void getValue(const Vector< Real > &x, Real &tol)