Feature Selection ToolboxFST3 Library / Documentation

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

Implements Sequential_Forward_Floating_Search and Sequential_Backward_Floating_Search. More...

#include <search_seq_sffs.hpp>

Inheritance diagram for FST::Search_SFFS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >:
Collaboration diagram for FST::Search_SFFS< 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_SFFS (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=SFFS, false=SBFS
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_SFFS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >

Implements Sequential_Forward_Floating_Search and Sequential_Backward_Floating_Search.

Note:
By default any initial subset contents are ignored; SFFS starts from empty set and SBFS starts from full set. Call enable_initial_subset() to let the search start from the initial sub contents.
In FST 3.1.0 this implementation has been corrected to better reflect original SFFS definition, which is slightly briefer and faster than the implementation in FST 3.0.x. See Search_SFRS for a closely related, slower, but more thorough method.
Examples:

demo11.cpp, demo11t.cpp, demo21.cpp, demo26.cpp, demo55.cpp, demo61.cpp, and demo63.cpp.


Member Data Documentation

template<class RETURNTYPE, typename DIMTYPE, class SUBSET, class CRITERION, class EVALUATOR>
SearchDirection FST::Search_SFFS< 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