Feature Selection ToolboxFST3 Library / Documentation

FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads > Class Template Reference

Implements threaded version of exhaustive (optimal) search yielding optimal feature subset with respect to chosen criterion. More...

#include <search_exhaustive_threaded.hpp>

Inheritance diagram for FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >:
Collaboration diagram for FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >:

List of all members.

Classes

struct  ThreadLocal
 thread-local storage of current subset candidate, criterion clone, and tracker clone More...

Public Types

typedef Search< RETURNTYPE,
DIMTYPE, SUBSET, CRITERION > 
parent
typedef boost::shared_ptr
< CRITERION > 
PCriterion
typedef boost::shared_ptr< SUBSET > PSubset

Public Member Functions

virtual bool search (const DIMTYPE target_d, RETURNTYPE &result, const PSubset sub, const PCriterion crit, std::ostream &os=std::cout)
 returns found subset of target_d features (optimizes cardinality if target_d==0) + criterion value
virtual std::ostream & print (std::ostream &os) const

Protected Member Functions

void evaluator_thread (unsigned int idx)
bool get_candidate (PSubset &sub)
 generates next candidate, then copies it to sub

Protected Attributes

PCriterion template_crit
ThreadLocal tlocal [max_threads]
boost::mutex mutex_candidate_generator
PSubset _candidate_generator
DIMTYPE _cardinality
DIMTYPE _target_d
bool _generate_first
 for current cardinality determines whether to call getFirstCandidateSubset or getNextCandidateSubset
boost::shared_ptr< StopWatchswatch

Detailed Description

template<class RETURNTYPE, typename DIMTYPE, class SUBSET, class CRITERION, unsigned int max_threads = 2>
class FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >

Implements threaded version of exhaustive (optimal) search yielding optimal feature subset with respect to chosen criterion.

Concurrently evaluates each subset candidate using clones of the supplied criterion and returns the one subset that yielded highest criterion value

Note:
Due to possibly high number of subsets to be tested expect excessive computational time. In case of result tracking the excessive number of possible combinations may consume unacceptable amount of memory - to prevent this it is highly recommended to set ResultTracker storage limit.
Examples:

demo40t.cpp.


Member Data Documentation

template<class RETURNTYPE, typename DIMTYPE, class SUBSET, class CRITERION, unsigned int max_threads = 2>
PCriterion FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >::template_crit [protected]

The documentation for this class was generated from the following file:

Generated on Thu Mar 31 11:38:55 2011 for FST3Library by  doxygen 1.6.1