44 #ifndef PH_REGRETOBJECTIVE_H
45 #define PH_REGRETOBJECTIVE_H
61 const Ptr<Objective<Real>>
obj_;
62 Ptr<ExpectationQuad<Real>>
quad_;
92 ParameterList &parlist)
97 std::string regret = parlist.sublist(
"SOL").sublist(
"Regret Measure").get(
"Name",
"Mean Absolute Loss");
101 quad_ = makePtr<QuantileQuadrangle<Real>>(parlist);
break;
103 quad_ = makePtr<MoreauYosidaCVaR<Real>>(parlist);
break;
105 quad_ = makePtr<GenMoreauYosidaCVaR<Real>>(parlist);
break;
107 quad_ = makePtr<LogExponentialQuadrangle<Real>>(parlist);
break;
109 quad_ = makePtr<MeanVarianceQuadrangle<Real>>(parlist);
break;
111 quad_ = makePtr<TruncatedMeanQuadrangle<Real>>(parlist);
break;
113 quad_ = makePtr<LogQuantileQuadrangle<Real>>(parlist);
break;
115 quad_ = makePtr<SmoothedWorstCaseQuadrangle<Real>>(parlist);
break;
117 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
118 "Invalid regret measure type " << regret <<
"!");
123 obj_->update(x,flag,iter);
146 Real gv = v.
dot(
g_->dual());
147 obj_->hessVec(hv,v,x,tol);
152 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 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.
virtual Real dot(const Vector &x) const =0
Compute where .
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)