Feature Selection ToolboxFST3 Library / Documentation

FST::Search_SFRS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR > Class Template Reference

Implements Sequential_Forward_Retreating_Search and Sequential_Backward_Retreating_Search. More...

#include <search_seq_sfrs.hpp>

Inheritance diagram for FST::Search_SFRS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >:
Collaboration diagram for FST::Search_SFRS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >:

List of all members.

Classes

struct  OneSubset
 Structure to hold [subset,criterion value] temporary solutions in the course of search. More...

Public Types

typedef Search_Sequential
< RETURNTYPE, DIMTYPE, SUBSET,
CRITERION, EVALUATOR > 
parent
typedef parent::parent grandparent
typedef boost::shared_ptr
< EVALUATOR > 
PEvaluator
typedef boost::shared_ptr
< CRITERION > 
PCriterion
typedef boost::shared_ptr< SUBSET > PSubset

Public Member Functions

 Search_SFRS (const PEvaluator evaluator)
virtual bool search (const DIMTYPE target_d, RETURNTYPE &result, const PSubset sub, const PCriterion crit, std::ostream &os=std::cout)
 returns found subset + criterion value
void set_search_direction (const SearchDirection direction)
 true=SFS, false=SBS (do not change concurrently to running search())
SearchDirection get_search_direction () const
void set_delta (const DIMTYPE delta)
 optional parameter to restrict search extent
DIMTYPE get_delta () const
bool get_result (const DIMTYPE d, RETURNTYPE &result, PSubset &sub)
 retrieves temporary solution of cardinality d that had been updated in the course of the last search (if it exists)
virtual std::ostream & print (std::ostream &os) const

Protected Attributes

SearchDirection _direction
DIMTYPE _delta
boost::scoped_array< OneSubsetbsubs
DIMTYPE _n
 bsubs array size
boost::scoped_ptr< SUBSET > pivotsub
 Note: this has different meaning than in DOS, the DOS pivotsub is called maxcritsub here.
boost::scoped_ptr< SUBSET > maxcritsub
 stores the subset with maximum known crit value

Detailed Description

template<class RETURNTYPE, typename DIMTYPE, class SUBSET, class CRITERION, class EVALUATOR>
class FST::Search_SFRS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >

Implements Sequential_Forward_Retreating_Search and Sequential_Backward_Retreating_Search.

Note:
By default any initial subset contents are ignored; SFRS starts from empty set and SBRS starts from full set. Call enable_initial_subset() to let the search start from the initial sub contents.
SFRS is closely related to SFFS, but is more thorough, slower, possibly more suitable if result regularization is to be eventually applied (selection of alternative solution based on secondary criterion), because SFRS evaluates more candidate subsets than SFFS.
Examples:

demo20.cpp, and demo52t.cpp.


Member Data Documentation

template<class RETURNTYPE, typename DIMTYPE, class SUBSET, class CRITERION, class EVALUATOR>
SearchDirection FST::Search_SFRS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >::_direction [protected]

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

Generated on Thu Mar 31 11:39:00 2011 for FST3Library by  doxygen 1.6.1