ConicBundle
|
default model selection routines for NNCModel More...
#include <NNCModelParameters.hxx>
Public Member Functions | |
NNCModelParameters (const CBout *cb=0, int incr=-1) | |
default constructor with the possibility to set the output | |
NNCModelParameters (int modelsize, int bundlesize=10, int updaterule=0, const CBout *cb=0, int incr=-1) | |
constructor for size parameters | |
NNCModelParameters (const BundleParameters &bp, const CBout *cb=0, int incr=-1) | |
copy constructor for BundleParameters | |
NNCModelParameters (const NNCModelParameters &sms) | |
copy constructor | |
virtual | ~NNCModelParameters () |
destructor | |
BundleParameters * | clone_BundleParameters () const |
clone | |
virtual int | select_model (MinorantBundle &model, CH_Matrix_Classes::Matrix &coefficients, CH_Matrix_Classes::Matrix &activity_indicators, const MinorantPointer &aggregate, const MinorantPointer ¢er_minorant, const MinorantBundle &cand_minorants, const MinorantBundle &old_minorants, MatrixFunctionOracle *oracle, FunctionTask function_task, CH_Matrix_Classes::Real function_factor, BundleModel::ModelUpdate model_update, CH_Matrix_Classes::Integer center_id, const CH_Matrix_Classes::Matrix ¢er_y, CH_Matrix_Classes::Integer cand_id, const CH_Matrix_Classes::Matrix &cand_y, CH_Matrix_Classes::Real model_maxviol, BundleProxObject &H) |
NNCModel calls this for selecting the next minorants for a polyhedral model. More... | |
Public Member Functions inherited from ConicBundle::NNCModelParametersObject | |
int | init (const BundleParameters &bp) |
initialize BundleParameters to given values, if bp is a SumModleParametersObject alos set n_local_models to its values, otherwise leave it unchanged | |
NNCModelParametersObject (const CBout *cb=0, int cbinc=-1) | |
default constructor | |
NNCModelParametersObject (const BundleParameters &bp, const CBout *cb=0, int cbinc=-1) | |
copy constructor for BundleParameters | |
NNCModelParametersObject (const NNCModelParametersObject &sms) | |
copy constructor | |
virtual | ~NNCModelParametersObject () |
virtual destructor, implemented in NNCModelParameters.cxx | |
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 | |
virtual int | mfile_data (std::ostream &out) const |
writes problem data to the given outstream | |
Public Member Functions inherited from ConicBundle::BundleParameters | |
virtual int | get_max_model_size () const |
returns the value of the variable | |
virtual int | get_max_bundle_size () const |
returns the value of the variable | |
virtual int | get_update_rule () const |
returns the value of the variable | |
virtual int | set_max_model_size (int mms) |
sets the value of the variable | |
virtual int | set_max_bundle_size (int mbs) |
sets the value of the variable | |
virtual int | set_update_rule (int ur) |
sets the value of the variable | |
BundleParameters (const BundleParameters &bp) | |
often works well: small model of size 2 and some history in bundle size for use in scaling | |
BundleParameters (int modelsize=-1, int bundlesize=-1, int updaterule=-1) | |
often works well for fast initial progress: small model of size 2 and some history in bundle size for use in scaling; default values give no preference at all | |
virtual | ~BundleParameters () |
virtual destructor | |
Private Member Functions | |
int | select_active_model (MinorantBundle &bundle, CH_Matrix_Classes::Matrix &coefficients, CH_Matrix_Classes::Matrix &indicators, CH_Matrix_Classes::Integer cand_id, const CH_Matrix_Classes::Matrix &cand_y, const MinorantBundle &minorants, bool grow) |
this implements update_rule 0 and 1: Add maximizing minorant, keep positive indicators if possible. Udate rule 1 grows up to maximum size during null steps before aggregating again. More... | |
int | select_model_heuristic (MinorantBundle &bundle, CH_Matrix_Classes::Matrix &coefficients, CH_Matrix_Classes::Matrix &activity_indicators, CH_Matrix_Classes::Integer cand_id, const CH_Matrix_Classes::Matrix &cand_y, const MinorantBundle &cand_minorants, const MinorantPointer &aggregate, FunctionTask function_task, CH_Matrix_Classes::Real function_factor) |
heuristic for updating the model grown over some time (update_rule==2); do not expect any documentation | |
Additional Inherited Members | |
Protected Attributes inherited from ConicBundle::BundleParameters | |
int | max_model_size |
maximum number of minorants to be selected for the cutting model (numbers<=1 for no limit, numbers >=2 impose a strict limit) | |
int | max_bundle_size |
suggested maximum number of latest minorants stored for use in a model, for constructing variable metric information etc. (negative numbers give no preference; the size may be increased internally in case of confliciting requirements, eg. in n_model_size or by variable metric routines) | |
int | update_rule |
in case several update rules are available | |
default model selection routines for NNCModel
It is always made sure that the aggregate and the minorant with maximum value are contained in the model. If max_model_size==2 this is all there is. If max_model_size<2, there is no limit on the model size, otherwise max_model_size is strictly observed.
update_rule in {0,1} are implemented by select_active_model() and are minimal fuss methods for keeping those non aggregate minorants that indicators show as active and aggregating the rest in either all steps (udate_rule 0) or just in descent steps or when the size limit is reached (update_rule 1).
uldate_rule 2 is an older heuristic that is still present if someone happens to miss it, but it won't ever be documented.
|
private |
this implements update_rule 0 and 1: Add maximizing minorant, keep positive indicators if possible. Udate rule 1 grows up to maximum size during null steps before aggregating again.
|
virtual |
NNCModel calls this for selecting the next minorants for a polyhedral model.
[in,out] | model | contains the model of the previous subproblem or a minimal starting choice |
[in,out] | coefficients | contains the coefficients resulting from the last bundel subproblem (on input and on output they should generate the aggregate, if the aggregate is valid) |
[in,out] | activity_indicators | contains activity_indicators resulting from the last bundel subproblem (currently 1 if considered active and 0 otherwise). Those indicated active in the bundle on input will also be indicated active |
[in] | aggregate | if valid, it holds the current aggregate. It arises as nonnegative combinations of the model by the coefficients (so it inculde the current function_factor). This property of model and coefficients should be maintained on output |
[in] | center_minorant | if valid, it holds the current aggregate. It arises as nonnegative combinations of the model by the coefficients, and that should be maintained on output |
[in] | cand_minorants | holds the vector of minorants returned by evaluation in the candidate point |
[in] | old_minorants | the vector of MinorantPointer gives additional minorants collected over time (some may be duplicates, some are most certainly already contained in the bundle on input) |
[in] | oracle | gives access to the evaluation oracle |
[in] | function_task | see FunctionTask |
[in] | function_factor | interpreted according to function_task and the coefficients sum up to at most this value |
[in] | model_update | informs about whether cand_y is the result of a null_step or descent_step or a new set up. |
[in] | center_id | the identifier of the center point |
[in] | center_y | the center point |
[in] | cand_id | the identifier of the candidate point |
[in] | cand_y | the candidate (mostly differnt from the center), close to it the model should be good |
[in] | model_maxviol | a minorant violated by this would have caused a null step |
[in] | H | the variable metric used in the proximal term (function_factor is already removed in this) |
Implements ConicBundle::NNCModelParametersObject.
Referenced by clone_BundleParameters().