Returns sum of pre-specified feature weights for features in the evaluated subset.
More...
|
| virtual void | initialize (const DIMTYPE noofweights, const PWeights weights) |
| | Adopts an existing weight array: SHARES ownership with the caller, nothing is copied.
|
|
virtual void | initialize (const DIMTYPE noofweights, const RETURNTYPE weights[]) |
| | Copies noofweights weights from a raw array into a freshly owned buffer (the caller's array is not referenced afterwards); see the ownership warning above.
|
| virtual bool | evaluate (RETURNTYPE &result, const PSubset sub) override |
| | Sums up the weights of the features selected in sub; always returns true. Weights are indexed by RAW feature index, so the array must hold exactly one entry per feature of the full feature set (asserted: noofweights == sub->get_n()).
|
| virtual std::ostream & | print (std::ostream &os) const override |
| | writes a human-readable identification of the object; base default writes nothing
|
| Criterion< RETURNTYPE, SUBSET > * | clone () const override |
| | dispatches to the DEEP_KIND mechanism (default CLONE_DEEP: Derived's copy-constructor)
|
| Criterion< RETURNTYPE, SUBSET > * | sharing_clone () const override |
| | dispatches to the SHARING_KIND mechanism (default CLONE_INHERIT: defers to Base, which throws by family convention)
|
| Criterion< RETURNTYPE, SUBSET > * | stateless_clone () const override |
| | dispatches to the STATELESS_KIND mechanism (default CLONE_INHERIT: defers to Base, which throws by family convention)
|
| virtual bool | is_monotonic () const |
| Criterion * | sharing_clone () const override |
| Criterion * | stateless_clone () const override |
| bool | is_clone () const |
|
bool | is_sharing () const |
| | true if this instance is a sharing_clone() result (referencing, not owning, the source's structures)
|
|
bool | is_sharing_clone () const |
| | true if this instance is BOTH a clone and sharing – i.e. specifically a sharing_clone() result, not a clone()/stateless_clone() one
|
template<class RETURNTYPE, typename DIMTYPE, class SUBSET>
class FST::Criterion_Sum_Of_Weights< RETURNTYPE, DIMTYPE, SUBSET >
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".