Feature Selection ToolboxFST3 Library / Documentation

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

Implements Oscillating_Search. More...

#include <search_seq_os.hpp>

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

List of all members.

Public Types

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

Public Member Functions

 Search_OS (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_delta (const DIMTYPE delta)
 oscillating cycle depth
DIMTYPE get_delta () const
virtual std::ostream & print (std::ostream &os) const

Protected Types

enum  SwingPhase {
  RESTART = 0, DOWN = 1, RETURN_UP = 2, UP = 4,
  RETURN_DOWN = 8
}

Protected Member Functions

virtual bool search_one (RETURNTYPE &result, const PSubset sub, const PCriterion crit, std::ostream &os)
 standard OS initialized by sub, target dimensionality sub->get_d()
virtual bool adjust_initial_subset (const DIMTYPE target_d, const PSubset sub, const PSearchBIF bif, std::ostream &os)
 if sub->get_d!=target_d, the contents of sub are either supplemented by best individual features or reduced by removing worst individual features to reach the target_d cardinality

Protected Attributes

DIMTYPE _delta
boost::scoped_ptr< SUBSET > pivotsub
boost::scoped_ptr< SUBSET > pivot_top
 helper to prevent redundant search when OS cycle depth increases
boost::scoped_ptr< SUBSET > pivot_bottom
 helper to prevent redundant search when OS cycle depth increases
boost::scoped_ptr< SUBSET > inisub
 used when testing all subset sizes
boost::shared_ptr< SUBSET > tmpsub
 used when testing all subset sizes

Private Attributes

bool track

Detailed Description

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

Implements Oscillating_Search.

Note:
By default sub is expected to be initialized prior to search() call, i.e., it should contain a valid initial subset of requested size, from which the search will start. If this is not the case and sub does not contain target_d features, sub contents are adjusted (sub is enlarged by adding features or shrinked by removing features based on individual feature ranking) before the search actually starts. Setting target_d to 0 leads to repeated search() calls for each possible subset size, to eventually select among them the solution with highest criterion value. To ensure that any initial contents of sub are completely ignored (and initial subset is composed from scratch based purely on individual feature ranking), call disable_initial_subset().
Warning:
Search_OS can not be used with Sequential_Step_Hybrid() parametrized _keep_perc==0 (due to initial filtercrit and crit values mix-up)
Examples:

demo22.cpp, demo33.cpp, and demo33t.cpp.


Member Function Documentation

template<class RETURNTYPE , typename DIMTYPE , class SUBSET , class CRITERION , class EVALUATOR >
bool FST::Search_OS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >::search_one ( RETURNTYPE &  result,
const PSubset  sub,
const PCriterion  crit,
std::ostream &  os 
) [inline, protected, virtual]

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

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