Feature Selection ToolboxFST3 Library / Documentation

demo40t.cpp File Reference

Example 40t: Threaded Exhaustive (optimal) feature selection. More...

#include <boost/smart_ptr.hpp>
#include <exception>
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include "error.hpp"
#include "global.hpp"
#include "subset.hpp"
#include "data_intervaller.hpp"
#include "data_splitter.hpp"
#include "data_splitter_5050.hpp"
#include "data_splitter_cv.hpp"
#include "data_scaler.hpp"
#include "data_scaler_void.hpp"
#include "data_accessor_splitting_memTRN.hpp"
#include "data_accessor_splitting_memARFF.hpp"
#include "criterion_wrapper.hpp"
#include "distance_Lp.hpp"
#include "classifier_knn.hpp"
#include "search_exhaustive_threaded.hpp"
#include "result_tracker_dupless.hpp"
Include dependency graph for demo40t.cpp:

Functions

int main ()

Detailed Description

Example 40t: Threaded Exhaustive (optimal) feature selection.


Function Documentation

int main (  ) 

Example 40t: Threaded Exhaustive (optimal) feature selection.

Exhaustive search yields optimal solutions but due to exponential search complexity tends to slow down dramatically with increasing dimensionality. Threaded implementation is thus desirable to improve exhaustive search applicability. The actual speed gain can be compromised on some platforms in small-sample, low-dimensional setting where criterion evaluation is extremely fast and thread management overhead thus comes more into play. But this is generally no issue because the application of threaded exhaustive search is of most importance under the opposite setting - with computationally demanding problems. The threaded exhaustive search implementation is demonstrated here on 15-dimensional data with 3-NN (based on L1.5 distance) wrapper classification accuracy as FS criterion - note how time consuming the computation is even for such relatively low-dimensional case. Classification accuracy (i.e, FS wrapper criterion value) is estimated on the first 50% of data samples by means of 3-fold cross-validation. The final classification performance on the selected subspace is eventually validated on the second 50% of data. Exhaustive search is called here in d-optimizing setting, invoked by parameter 0 in search(0,...), which is otherwise used to specify the required subset size. Optional result tracking is employed here to reveal duplicate solutions yielding the same maximum criterion value (see also Example 60: Detecting alternative feature selection results with equal criterion value.).

Note:
The maximum permitted number of threads to run at once is to be user-specified depending on hardware.

References FST::Search< RETURNTYPE, DIMTYPE, SUBSET, CRITERION >::enable_result_tracking(), FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >::search(), and FST::Search< RETURNTYPE, DIMTYPE, SUBSET, CRITERION >::set_output_detail().


Generated on Thu Mar 31 11:36:20 2011 for FST3Library by  doxygen 1.6.1