ConicBundle
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ConicBundle::BundleLowRankTrustRegionProx Class Reference

implements the abstract interface BundleProxObject for $\|y-\hat{y}\|_H^2$ with $ H=V\Lambda V^\top+u I$, i.e., a low rank representation of a symmetric positive definite matrix with the weight times identity added as regularization More...

#include <BundleLowRankTrustRegionProx.hxx>

Inheritance diagram for ConicBundle::BundleLowRankTrustRegionProx:
ConicBundle::BundleProxObject ConicBundle::VariableMetric ConicBundle::QPSolverProxObject ConicBundle::CBout

Public Member Functions

 BundleLowRankTrustRegionProx (CH_Matrix_Classes::Integer dim=0, VariableMetricSelection *vp=0, bool local_metric=false, CBout *cb=0, int inc=-1)
 default constructor with empty H (equal to zero) and the dimension as argument
 
 BundleLowRankTrustRegionProx (const CH_Matrix_Classes::Matrix &in_vecH, const CH_Matrix_Classes::Matrix &in_lamH, VariableMetricSelection *vp=0, bool local_metric=false, CBout *cb=0, int inc=-1)
 constructs H=vecH*Diag(lamH)*transpose(vecH), so in_lamH must be a column vector with same dimension as columns in in_vecH and the row dimension of in_vecH must match the design space, in_vecH is assumed orthogonal
 
virtual ~BundleLowRankTrustRegionProx ()
 destructor
 
void set_weightu (CH_Matrix_Classes::Real in_weightu)
 sets the next weight
 
CH_Matrix_Classes::Real get_weightu () const
 returns the current weight in use
 
CH_Matrix_Classes::Real get_term_corr () const
 returns a correction factor for termination precision if the quadratic term is strong
 
void init (const CH_Matrix_Classes::Matrix &in_vecH, const CH_Matrix_Classes::Matrix &in_lamH)
 reset the prox information; in_vecH must be an orthogonal matrix with in_vecH.rowdim() matching the dimension but maybe with zero columns; in_lamH must be a column vector with row dimension matching the column dimension of in_vecH and all entries positive
 
virtual CH_Matrix_Classes::Real norm_sqr (const CH_Matrix_Classes::Matrix &B) const
 returns $|B|^2_H$ (with weight included)
 
virtual CH_Matrix_Classes::Real dnorm_sqr (const MinorantPointer &B) const
 returns $|B|^2_{H^{-1}}$ (with weight included)
 
virtual bool is_DLR () const
 return true if H is of the form diagonal matrix plus Gram matrix of a low rank matrix
 
virtual int add_H (CH_Matrix_Classes::Symmatrix &big_sym, CH_Matrix_Classes::Integer start_index=0) const
 add H to the dense symmetric matrix as a principal submatrix starting at position start_index
 
virtual CH_Matrix_Classes::Matrixadd_Hx (const CH_Matrix_Classes::Matrix &x, CH_Matrix_Classes::Matrix &outplusHx, CH_Matrix_Classes::Real alpha=1.) const
 adds $alpha*Hx$ to outplusHx and returns this
 
virtual CH_Matrix_Classes::Matrixapply_Hinv (CH_Matrix_Classes::Matrix &x) const
 returns $H^{-1}x$ where $H^{-1}=\frac1u(I-V(\Lambda/(\Lambda+u))V^\top)$
 
virtual void get_precond (CH_Matrix_Classes::Matrix &inD, const CH_Matrix_Classes::Matrix *&Vp) const
 returns a suitable approximation for preconditioning, see BundleProxObject::get_precond
 
virtual int compute_QP_costs (CH_Matrix_Classes::Symmatrix &Q, CH_Matrix_Classes::Matrix &d, CH_Matrix_Classes::Real &offset, const MinorantPointer &constant_minorant, const MinorantBundle &bundle, const CH_Matrix_Classes::Matrix &y, const MinorantPointer &groundset_minorant, CH_Matrix_Classes::Indexmatrix *yfixed)
 computes the dual QP costs Q, d, and the constant offset to the bundle subproblem, see BundleProxObject::compute_QP_costs
 
virtual int update_QP_costs (CH_Matrix_Classes::Symmatrix &delta_Q, CH_Matrix_Classes::Matrix &delta_d, CH_Matrix_Classes::Real &delta_offset, const MinorantPointer &constant_minorant, const MinorantBundle &bundle, const CH_Matrix_Classes::Matrix &center_y, const MinorantPointer &groundset_minorant, const MinorantPointer &delta_groundset_minorant, const CH_Matrix_Classes::Indexmatrix &delta_index, CH_Matrix_Classes::Indexmatrix *yfixed)
 updates the dual QP costs Q, d, and the constant offset to the bundle subproblem, see BundleProxObject::update_QP_costs
 
virtual int apply_modification (const GroundsetModification &gsmdf)
 when BundleSolver is called to modify the groundset it also calls this
 
virtual BundleProxObjectprojected_clone (const CH_Matrix_Classes::Indexmatrix &indices)
 in order to allow for fixed variables, this generates a clone restricted to the given indices
 
virtual bool supports_diagonal_bounds_scaling () const
 this implementation does not support a diagonal scaling heuristic, therefore the following routine has to return true.
 
virtual int diagonal_scaling_heuristic_update (const CH_Matrix_Classes::Matrix &)
 if supported, D_update has to contain nonnegative numbers that are permanently added to the diagonal here. It is important to keep track of this change only if afterwards update_QP_costs is called before compute_QP_costs. In this case the only nonzero enries in D_update must be those of delta_index
 
virtual bool supports_dense_variable_metric () const
 returns true if dynamic scaling with dense symmetric matrices is supported
 
virtual bool supports_lowrank_variable_metric () const
 returns true if dynamic scaling with low rank structure is supported
 
virtual bool supports_diagonal_variable_metric () const
 returns true if dynamic scaling with diagonal matrices is supported
 
virtual int apply_variable_metric (VariableMetricModel *groundset, VariableMetricModel *model, const CH_Matrix_Classes::Matrix &aggr, CH_Matrix_Classes::Integer y_id, const CH_Matrix_Classes::Matrix &y, bool descent_step, CH_Matrix_Classes::Real &current_weight, CH_Matrix_Classes::Real model_maxviol, const CH_Matrix_Classes::Indexmatrix *new_indices=0)
 see DynamicProx
 
virtual int add_variable_metric (CH_Matrix_Classes::Matrix &diagH, CH_Matrix_Classes::Matrix &vecH)
 see BundleProxObject::add_dynamic_scaling()
 
virtual int push_aft (const AffineFunctionTransformation *aft)
 see BundleProxObject::push_aft();
 
virtual int pop_aft ()
 see BundleProxObject::pop_aft();
 
virtual int mfile_data (std::ostream &out) const
 output the description of the prox term in mfile-suitable format
 
- Public Member Functions inherited from ConicBundle::BundleProxObject
 BundleProxObject (VariableMetricSelection *vp=0, bool local_scaling=false, bool bounds_scaling=false, CBout *cb=0, int cbincr=-1)
 default constructor, switching on dynamic scaling only works for classes with corresponding support
 
virtual void set_short_QPsteps (CH_Matrix_Classes::Integer shortQPst)
 may be used to indicate seemingly conservative step sizes possibly due to the quadratic term
 
virtual CH_Matrix_Classes::Integer get_short_QPsteps ()
 retrieves the number of conservative step sizes possibly due to the quadratic term passed on to this
 
int apply_factor (CH_Matrix_Classes::Real f)
 allows AFTModel and SumModel to accumulate a compensation factor for tracing the effects of recursive applications of function_factor in update_model (does not affect H but can be retrieved by get_factor() for this purpose)
 
CH_Matrix_Classes::Real get_factor ()
 returns the current accumulated compensation factor by which H would need to be scaled in order to reflect the curvature relative to the current function without function_factor;
 
- Public Member Functions inherited from ConicBundle::VariableMetric
virtual ~VariableMetric ()
 virtual destructor
 
 VariableMetric (VariableMetricSelection *vp=0, bool use_loc_metric=false, bool use_bnds_scaling=false, CBout *cbo=0, int cbinc=-1)
 default constructor; if vp is not zero, ownership of *vp is passed over to *this and *this will delete vp
 
VariableMetricSelectionget_variable_metric_selection () const
 returns 0 or an available VariableMetricSelection object, that may be employed for computing a variable metric term in accordance with the value of use_local_metric
 
void set_variable_metric_selection (VariableMetricSelection *vp=0)
 sets use_variable_metric; the object passed is then owned by this
 
bool employ_variable_metric () const
 returns true if some dynamic scaling is supported and switched on
 
virtual int add_variable_metric (CH_Matrix_Classes::Symmatrix &)
 adds a suitable modification of symH (symH may be modified in this) to the scaling matrix H More...
 
bool get_use_bounds_scaling () const
 returns use_bounds_scaling
 
void set_use_bounds_scaling (bool bounds_scaling)
 sets use_bounds_scaling
 
bool employ_diagonal_bounds_scaling () const
 if the respective implementation supports a diagonal bounds scaling heuristic, the following routine has to return true; see also diagonal_bounds_scaling_update()
 
virtual int diagonal_bounds_scaling_update (const CH_Matrix_Classes::Matrix &)
 if supported, D_update has to contain nonnegative numbers that are permanently added to the diagonal here. More...
 
bool get_use_local_metric () const
 returns use_local_metric
 
void set_use_local_metric (bool local_metric)
 sets use_local_metric
 
- Public Member Functions inherited from ConicBundle::CBout
virtual void set_out (std::ostream *out=0, int print_level=1)
 Specifies the output level (out==NULL: no output at all, out!=NULL and level=0: errors and warnings, level>0 increasingly detailed information) More...
 
virtual void set_cbout (const CBout *cb, int incr=-1)
 Specifies the output level relative to the given CBout class. More...
 
void clear_cbout ()
 reset to default settings (out=0,print_level=1)
 
 CBout (const CBout *cb=0, int incr=-1)
 calls set_cbout
 
 CBout (std::ostream *outp, int pl=1)
 initialize correspondingly
 
 CBout (const CBout &cb, int incr=0)
 copy constructor
 
virtual bool cb_out (int pl=-1) const
 Returns true if out!=0 and (pl<print_level), pl<0 should be used for WARNINGS and ERRORS only, pl==0 for usual output.
 
std::ostream & get_out () const
 If cb_out() returned true, this returns the output stream, but it will abort if called with out==0.
 
std::ostream * get_out_ptr () const
 returns the pointer to the output stream
 
int get_print_level () const
 returns the print_level
 
- Public Member Functions inherited from ConicBundle::QPSolverProxObject
virtual ~QPSolverProxObject ()
 virtual destructor
 

Private Member Functions

void clean ()
 if not clean this orthogonalizes vecH and trucates lamH
 
void compute_corr ()
 computes the correction value, here min(1,dim/trace(H))
 

Private Attributes

CH_Matrix_Classes::Real weightu
 the current weight added to H in the form of weightu*I
 
CH_Matrix_Classes::Matrix vecH
 orthonormal columns for the low rank representation
 
CH_Matrix_Classes::Matrix lamH
 positive definite scalars for the diagonal vecH*Diag(lamH)*transpose(vecH)
 
CH_Matrix_Classes::Matrix scaled_vecH
 vecH*Diag(sqrt(lamH)) for use in preconditioning
 
CH_Matrix_Classes::Matrix lamHi
 the diagonal weights adapted for the low rank inverse
 
CH_Matrix_Classes::Matrix sqrtlamHi
 the square root of the diagonal weights adapted for the low rank inverse
 
CH_Matrix_Classes::Real corr_val
 the correction value for correcting termination precision
 
CH_Matrix_Classes::Indexmatrix old_fixed_ind
 the fixed indices for which the QP_costs were computed
 
CH_Matrix_Classes::Matrix _A
 for compute_QP_costs() this holds the subgradients with zeroed fixed parts
 
CH_Matrix_Classes::Matrix _b
 for compute_QP_costs() this holds the constant subgradient with zeroed fixed parts
 
CH_Matrix_Classes::Matrix _c
 for compute_QP_costs() this holds the offset values including fixed contributions
 
CH_Matrix_Classes::Real _delta
 for compute_QP_costs() this holds the constant offset including fixed contributions
 
CH_Matrix_Classes::Matrix _y
 for compute_QP_costs() this holds the non_fixed part of center_y
 
CH_Matrix_Classes::Matrix LinvindHt
 for compute_QP_costs() this holds L^{-1}* vecH^T for non fixed indices
 
CH_Matrix_Classes::Symmatrix old_LinvQ
 the old quadratic cost matrix dependent on the low rank part
 
CH_Matrix_Classes::Matrix oldd
 the old linear cost term;
 
CH_Matrix_Classes::Real oldoffset
 the old costant cost term;
 
const CH_Matrix_Classes::Indexmatrixnew_indices
 if values should be computed for a new subset indices, this is stored here
 
std::vector< const AffineFunctionTransformation * > aft_stack
 in add_variable_metric() the stack serves to transform the given data
 
bool needs_cleaning
 flag for variable metric, whether columns have been orthogonalized and lam truncated
 
CH_Matrix_Classes::Integer max_columns
 for variable metric this gives an upper bound for collecting columns before cleaning
 

Additional Inherited Members

- Protected Attributes inherited from ConicBundle::BundleProxObject
CH_Matrix_Classes::Real factor
 used to accumulate a compensation factor for function_factor; this factor is not included in H but can be applied externally via get_factor() if required
 
CH_Matrix_Classes::Integer short_QPsteps
 the QP may signal short steps that seem due to the quadratic term by setting this counter via set_short_QPsteps()
 
- Static Protected Attributes inherited from ConicBundle::BundleProxObject
static const CH_Matrix_Classes::Integer xdim_threshold = 100
 constant for possible use if QP coefficients are to be computed in parallel (still purely experimental)
 

Detailed Description

implements the abstract interface BundleProxObject for $\|y-\hat{y}\|_H^2$ with $ H=V\Lambda V^\top+u I$, i.e., a low rank representation of a symmetric positive definite matrix with the weight times identity added as regularization

The regularized low rank representation reads $H=rI+V\Lambda V^T$ where $r>0$ is a scalar regularization parameter, $I$ is the identity, $\Lambda$ is a strictly positive diagonal matrix and the orthogonal matrix $V$ holds the corresponding column vectors.

For this the inverse is formed via a QR-variant for numerical stability.


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