Returns sum of pre-specified feature weights for features in the evaluated subset. More...
#include <criterion_sumofweights.hpp>
Public Types | |
typedef boost::shared_ptr< SUBSET > | PSubset |
typedef boost::shared_array < RETURNTYPE > | PWeights |
Public Member Functions | |
virtual void | initialize (const DIMTYPE noofweights, const PWeights weights) |
virtual void | initialize (const DIMTYPE noofweights, const RETURNTYPE weights[]) |
virtual bool | evaluate (RETURNTYPE &result, const PSubset sub) |
sums up weights of the features selected in sub | |
Criterion_Sum_Of_Weights * | clone () const |
Criterion_Sum_Of_Weights * | sharing_clone () const |
Criterion_Sum_Of_Weights * | stateless_clone () const |
virtual std::ostream & | print (std::ostream &os) const |
Protected Attributes | |
PWeights | _weights |
DIMTYPE | _noofweights |
Private Member Functions | |
Criterion_Sum_Of_Weights (const Criterion_Sum_Of_Weights &css) |
Returns sum of pre-specified feature weights for features in the evaluated subset.
This trivial criterion is intended as secondary criterion to be used in conjunction with Result_Tracker_Regularizer, allowing to find subset among those close to the known best such that the sum of known feature weights (e.g., feature acquisition cost) is minimized. This is usable, e.g., in medicine where different measurements have different costs (e.g., measuring body temperature may be cheaper than laboratory tests, etc.). The technique is described in 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.
Criterion_Sum_Of_Weights< RETURNTYPE, DIMTYPE, SUBSET > * FST::Criterion_Sum_Of_Weights< RETURNTYPE, DIMTYPE, SUBSET >::clone | ( | ) | const [inline, virtual] |
create 1:1 independent clone of the current object
Implements FST::Clonable.
Criterion_Sum_Of_Weights* FST::Criterion_Sum_Of_Weights< RETURNTYPE, DIMTYPE, SUBSET >::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
Implements FST::Clonable.
Criterion_Sum_Of_Weights* FST::Criterion_Sum_Of_Weights< RETURNTYPE, DIMTYPE, SUBSET >::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
Implements FST::Clonable.