Collects multiple results. Enables eventual selection of alternative solution based on secondary criterion. More...
#include <result_tracker_regularizer.hpp>
Public Types | |
typedef Result_Tracker_Dupless < RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET > | parent |
typedef parent::ResultRec | ResultRec |
typedef ResultRec * | PResultRec |
typedef boost::shared_ptr< SUBSET > | PSubset |
typedef boost::shared_ptr < CRITERION > | PCriterion |
Public Member Functions | |
Result_Tracker_Regularizer (const IDXTYPE capacity_limit=0) | |
Result_Tracker_Regularizer (const Result_Tracker_Regularizer &rtr) | |
virtual bool | optimize_within_margin (const RETURNTYPE margin, RETURNTYPE &result1, RETURNTYPE &result2, PSubset &sub, const PCriterion crit) |
virtual bool | optimize_within_first_equivalence_group (RETURNTYPE &result1, RETURNTYPE &result2, PSubset &sub, const PCriterion crit) |
returns the subset from the first equivalence group (=subsets with equal primary criterion value) yielding the highest crit value | |
virtual bool | optimize_within_next_equivalence_group (RETURNTYPE &result1, RETURNTYPE &result2, PSubset &sub) |
returns the subset from the next equivalence group (=subsets with equal primary criterion value which is the next highest in sequence) yielding the highest crit value | |
Result_Tracker_Regularizer * | clone () const |
Result_Tracker_Regularizer * | sharing_clone () const |
Result_Tracker_Regularizer * | stateless_clone () const |
virtual std::ostream & | print (std::ostream &os) const |
Private Member Functions | |
bool | optimize_within_equivalence_group (RETURNTYPE &result1, RETURNTYPE &result2, PSubset &sub) |
building block for optimize_within_*_equivalence_group | |
Private Attributes | |
PCriterion | _crit |
RETURNTYPE | _prevmax |
parent::CONSTRESULTSITER | _iter |
bool | _searching |
Collects multiple results. Enables eventual selection of alternative solution based on secondary criterion.
Enables selecting a different subset than the one yielded by the search procedure, e.g., with the aim to reduce overfitting or to take into account known feature acquisition cost.
The idea is to consider all known subsets with criterion value close enough to the maximum as effectively equal - then another criterion is used to choose among those alternative solutions. This technique can improve generalization/robustness and reduce overfitting, as well as open up other possibilities, like preferring a subset being almost equal to the primarily selected, but with considerably lower feature value acquisition cost, etc. For details see paper Somol, Grim, Pudil: The Problem of Fragile Feature Subset Preference in Feature Selection Methods and A Proposal of Algorithmic Workaround. In Proc. ICPR 2010. IEEE Computer Society, 2010.
demo51.cpp, demo52t.cpp, and demo61.cpp.
Result_Tracker_Regularizer* FST::Result_Tracker_Regularizer< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET, CRITERION >::clone | ( | ) | const [inline, virtual] |
create 1:1 independent clone of the current object
Reimplemented from FST::Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET >.
Referenced by FST::Result_Tracker_Regularizer< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET, CRITERION >::stateless_clone().
Result_Tracker_Regularizer* FST::Result_Tracker_Regularizer< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET, CRITERION >::sharing_clone | ( | ) | const [inline, virtual] |
create equivalent clone of the current object, parmitting read-only access to structures in the source object (allows referencing instead of copying of large memory structures). may be faster and save space but requires more caution with respect to concurrency Use example: Data_Accessor memory data representation cloning
Reimplemented from FST::Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET >.
Result_Tracker_Regularizer< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET, CRITERION > * FST::Result_Tracker_Regularizer< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET, CRITERION >::stateless_clone | ( | ) | const [inline, virtual] |
create clone of the current object, ignoring internal temporary structures to save speed. Does not replicate exact object state. The clone must be used carefully in a way that ensures internal structure re-initialization Use example: Data_Splitter cloning or Classifier_SVM cloning due to inability to clone external structures defined in LibSVM
Reimplemented from FST::Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET >.
References FST::Result_Tracker_Regularizer< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET, CRITERION >::clone().