Example 10: Basic Filter-based 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_scaler.hpp"
#include "data_scaler_void.hpp"
#include "data_accessor_splitting_memTRN.hpp"
#include "data_accessor_splitting_memARFF.hpp"
#include "criterion_normal_gmahalanobis.hpp"
#include "distance_euclid.hpp"
#include "classifier_knn.hpp"
#include "seq_step_straight.hpp"
#include "search_seq_sfs.hpp"
Functions | |
int | main () |
Example 10: Basic Filter-based feature selection.
int main | ( | ) |
This is a simple example of filter-based feature selection, as described in the seminal book by Devijver and Kittler from 1982 - Pattern Recognition: A Statistical Approach. Features are selected here using the Sequential Forward Selection (SFS) procedure so as to maximize the Generalized Mahalanobis probabilistic class distance based on the assumption of normality of the data. Generalized Mahalanobis is evaluated on the first 50% of data samples. The selected subset is eventually verified by means of 3-NN classifier accuracy estimation on the second 50% (independent test) part of the data. SFFS is called here in d-parametrized setting, invoked by nonzero parameter d in search(d,...). In this scenario the user has to decide about the target subset size.
References FST::Search_SFS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >::search(), and FST::Search_SFS< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, EVALUATOR >::set_search_direction().