Collects evaluated subsets to eventually provide Dependency-Aware Feature Ranking coefficients.
More...
|
|
typedef Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET > | parent |
| | the base tracker: dupless probe storage sorted descending by criterion value; this class adds DAF post-processing over it
|
|
typedef Clonable_Impl< Result_Tracker_Feature_Stats, parent, CLONE_INHERIT, CLONE_INHERIT, CLONE_DEEP > | parent_impl |
| | implements stateless_clone(); clone()/sharing_clone() throw in Result_Tracker
|
|
typedef parent::ResultRec | ResultRec |
| | [subset,criterion value] result record, see Result_Tracker::ResultRec
|
|
typedef ResultRec * | PResultRec |
| | raw pointer to a ResultRec, as used by the inherited get_first()/get_next() iteration
|
| typedef std::shared_ptr< SUBSET > | PSubset |
|
typedef Result_Tracker< RETURNTYPE, SUBSET > | parent |
| | the abstract Result_Tracker interface this class implements
|
|
typedef Clonable_Impl< Result_Tracker_Dupless, parent, CLONE_INHERIT, CLONE_INHERIT, CLONE_DEEP > | parent_impl |
| | implements stateless_clone() via the copy-constructor (CLONE_DEEP); clone()/sharing_clone() are inherited from Result_Tracker, which throws for both
|
|
typedef parent::ResultRec | ResultRec |
| | see Result_Tracker::ResultRec
|
|
typedef parent::PResultRec | PResultRec |
| | see Result_Tracker::PResultRec
|
| typedef std::shared_ptr< SUBSET > | PSubset |
|
typedef std::list< ResultRec >::const_iterator | CONSTRESULTSITER |
| | read-only iterator over results, for use by subclasses/friends inspecting the collected results
|
|
typedef std::list< ResultRec >::iterator | RESULTSITER |
| | mutable iterator over results, as returned by begin()/end()
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to a tracked feature subset
|
|
typedef ResultRec * | PResultRec |
| | raw pointer to a ResultRec, as used by get_first()/get_next() iteration
|
|
| | Result_Tracker_Feature_Stats (const IDXTYPE capacity_limit=0) |
|
| Result_Tracker_Feature_Stats (const Result_Tracker_Feature_Stats &rtfs) |
| | the stateless_clone() copy: replicates configuration (capacity limit, margin) via the parent copy-constructor but starts with an empty probe list and no computed statistics – compute_stats()/compute_pair_stats() must be rerun on the clone
|
| bool | compute_stats (std::ostream &os=std::cout) |
| | Aggregates DAF ranking statistics (DAF0/DAF1/DAF2) from all probe subsets recorded so far.
|
| bool | print_stats (std::ostream &os=std::cout) |
| bool | getFirstDAF (RETURNTYPE &value, DIMTYPE &feature, const unsigned int DAFidx=0) const |
| | Starts an iteration (descending by value) over the feature ordering built by compute_stats() for the given DAF variant.
|
| bool | getNextDAF (RETURNTYPE &value, DIMTYPE &feature, const unsigned int DAFidx=0) const |
| bool | compute_pair_stats (const DIMTYPE top_k, std::ostream &os=std::cout) |
| | Computes pairwise (group) DAF statistics: 2x2 presence-cell contrasts over all pairs of the top top_k DAF0-ranked features.
|
| bool | print_pair_stats (std::ostream &os=std::cout, const std::size_t top_pairs=0) |
| bool | getFirstPairDAF (RETURNTYPE &daf0, RETURNTYPE &daf1, bool &daf1_valid, RETURNTYPE &synergy, DIMTYPE &f1, DIMTYPE &f2) const |
| | Starts an iteration (decreasing pair-DAF0) over the pairwise statistics built by compute_pair_stats().
|
| bool | getNextPairDAF (RETURNTYPE &daf0, RETURNTYPE &daf1, bool &daf1_valid, RETURNTYPE &synergy, DIMTYPE &f1, DIMTYPE &f2) const |
| virtual std::ostream & | print (std::ostream &os) const override |
| | writes a human-readable identification of the object; base default writes nothing
|
| Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET > * | clone () const override |
| | dispatches to the DEEP_KIND mechanism (default CLONE_DEEP: Derived's copy-constructor)
|
| Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET > * | sharing_clone () const override |
| | dispatches to the SHARING_KIND mechanism (default CLONE_INHERIT: defers to Base, which throws by family convention)
|
| Result_Tracker_Dupless< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET > * | stateless_clone () const override |
| | dispatches to the STATELESS_KIND mechanism (default CLONE_INHERIT: defers to Base, which throws by family convention)
|
| | Result_Tracker_Dupless (const IDXTYPE capacity_limit=0) |
|
| Result_Tracker_Dupless (const Result_Tracker_Dupless &rtd) |
| | copies the configuration (margin, cardinality restriction, capacity limit) only; the results list is NOT copied (starts empty) – this constructor backs stateless_clone() (CLONE_DEEP), which by contract does not replicate exact object state
|
| virtual bool | add (const RETURNTYPE value, const PSubset sub) override |
| | Offers one (value, subset) result for inclusion; sub is copied, the caller keeps ownership of its own object.
|
| virtual void | clear () override |
| | discards all recorded results
|
| virtual std::size_t | size () const override |
| | number of results currently held (std::size_t rather than 'long': on LLP64 platforms 'long' is 32 bits and would narrow the container's own size type)
|
|
virtual std::size_t | size (const RETURNTYPE margin) const |
| | number of currently held results whose value is within margin of the best (first, highest-value) held result
|
| virtual bool | get_first (PResultRec &r) override |
| | starts iteration at the best held result; false if nothing is held. The returned pointer refers into this tracker's own storage and is invalidated by add(), join() and clear()
|
| virtual bool | get_next (PResultRec &r) override |
| | hands out the next result in descending-value order; false when the iteration is exhausted. There is one shared cursor per tracker, so nested or concurrent iterations of the same tracker interfere
|
| virtual void | join (Result_Tracker< RETURNTYPE, SUBSET > &src) override |
| | merges the results held by src into this tracker, keeping the ordering and skipping duplicates exactly as add() does, then re-applies the capacity limit and the margin to the merged list. Consumes src's iteration cursor; src itself is left unchanged
|
|
void | set_inclusion_margin (const RETURNTYPE margin=0) |
| | restrict adding to only subsets with criterion value within given distance (margin) from best known
|
|
void | set_inclusion_cardinality_restriction (const DIMTYPE d) |
| | for d>0 restricts adding only to subsets of size d, for d=0 subset size restriction is removed
|
|
RESULTSITER | begin () |
| | iterator to the best (first) held result
|
|
RESULTSITER | end () |
| | iterator past the last held result
|
|
| Result_Tracker (const Result_Tracker &rt) |
| | copies the output-detail setting only – concrete trackers copy their own collected results separately
|
| Result_Tracker * | clone () const override |
| Result_Tracker * | sharing_clone () const override |
|
void | set_output_detail (OutputDetail detail) |
| | sets the amount of information that is logged to output stream throughout the course of search
|
|
OutputDetail | get_output_detail () const |
| | the currently configured output detail level
|
|
bool | output_normal () const |
| | true unless output detail is SILENT
|
|
bool | output_detailed () const |
| | true only at the DETAILED output level
|
| 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
|
|
| DIMTYPE | _n |
|
std::vector< FeatureStat > | _stats |
| | one entry per feature (index 0.._n-1), aggregated over all recorded probes; filled by compute_stats()
|
|
std::vector< SubSizeStat > | _dstat |
| | one entry per subset size 1.._n (index 0 unused); filled by compute_stats()
|
|
ORDERTYPE | _order [3] |
| | per DAF variant (0=DAF0, 1=DAF1, 2=DAF2): feature indices with a valid DAF value, sorted descending by that value; built by compute_stats()
|
|
DIMTYPE | _itersize [3] |
| | per DAF variant: getFirstDAF()/getNextDAF() cursor position (index into _order[DAFidx]); 0 = iteration not started
|
|
std::mutex | _itersize_mutex |
| | serializes access to the iteration cursors _itersize AND _pair_itersize across concurrent getFirst/getNext calls (threaded builds only)
|
|
std::vector< PairStat > | _pair_stats |
| | upper-triangle linearization (via pair_index()) over the top-k feature set; filled by compute_pair_stats()
|
|
std::vector< DIMTYPE > | _pair_features |
| | the top-k DAF0-ranked (global) feature indices the pairs are drawn from
|
|
std::vector< std::size_t > | _pair_order |
| | indices into _pair_stats, valid pairs only, sorted decreasing pair-DAF0
|
| std::size_t | _pair_itersize |
|
std::list< ResultRec > | results |
| | held results, sorted descending by value (ties broken toward the smaller subset); see add() for the exact insertion/dedup/trim rule
|
|
RETURNTYPE | _margin |
| | set via set_inclusion_margin(); 0 = no margin restriction
|
|
DIMTYPE | _restrict_to_d |
| | set via set_inclusion_cardinality_restriction(); 0 = no subset-size restriction
|
|
const IDXTYPE | _capacity_limit |
| | set by the constructor; 0 = unlimited
|
|
OutputDetail | _detail |
| | the output detail level set via set_output_detail(); read by output_normal()/output_detailed()
|
template<class RETURNTYPE, typename IDXTYPE, typename DIMTYPE, class SUBSET>
class FST::Result_Tracker_Feature_Stats< RETURNTYPE, IDXTYPE, DIMTYPE, SUBSET >
Collects evaluated subsets to eventually provide Dependency-Aware Feature Ranking coefficients.
Dependency-Aware Feature ranking (DAF) is a new type of ranking method especially suitable for very-high-dimensional feature selection. Unlike standard individual feature ranking, the DAF ranking reflects "average feature quality in context" and as such is capable of providing significantly better results than BIF (provided the data actually do contain mutually dependent features). The method has been described in combination with Monte Carlo based feature selection permitting Wrapper Criteria even in very-high-dimensional setting. The tracker is not a search of its own: attach it to any search that generates many probe subsets (Monte Carlo search is the usual choice), let the search run, then call compute_stats() and read the ranking off getFirstDAF()/getNextDAF(). For ready-to-run examples see the demo34 and demo35t protocols (demos/demo34.cfg, demos/demo35t.cfg). For more detailed information see UTIA Technical Report No. 2295.