Presentation is loading. Please wait.

Presentation is loading. Please wait.

Feature selection methods Isabelle Guyon IPAM summer school on Mathematics in Brain Imaging. July 2008.

Similar presentations


Presentation on theme: "Feature selection methods Isabelle Guyon IPAM summer school on Mathematics in Brain Imaging. July 2008."— Presentation transcript:

1

2 Feature selection methods Isabelle Guyon isabelle@clopinet.com IPAM summer school on Mathematics in Brain Imaging. July 2008

3 Feature Selection Thousands to millions of low level features: select the most relevant one to build better, faster, and easier to understand learning machines. X n m n’

4 Applications Bioinformatics Quality control Machine vision Customer knowledge variables/features examples 10 10 2 10 3 10 4 10 5 OCR HWR Market Analysis Text Categorization System diagnosis 1010 2 10 3 10 4 10 5 10 6

5 Nomenclature Univariate method: considers one variable (feature) at a time. Multivariate method: considers subsets of variables (features) together. Filter method: ranks features or feature subsets independently of the predictor (classifier). Wrapper method: uses a classifier to assess features or feature subsets.

6 Univariate Filter Methods

7 Univariate feature ranking Normally distributed classes, equal variance  2 unknown; estimated from data as  2 within. Null hypothesis H 0 :  + =  - T statistic: If H 0 is true, t= (  + -  -)/(  within  m + +1/m -  Student  m + +m - -  d.f.  -- ++ -- ++ P(X i |Y=-1) P(X i |Y=1) xixi

8 H 0 : X and Y are independent. Relevance index  test statistic. Pvalue  false positive rate FPR = n fp / n irr Multiple testing problem: use Bonferroni correction pval  n pval False discovery rate: FDR = n fp / n sc  FPR n/n sc Probe method: FPR  n sp /n p pval r0r0 r Null distribution Statistical tests ( chap. 2)

9 Univariate Dependence Independence: P(X, Y) = P(X) P(Y) Measure of dependence: MI(X, Y) =  P(X,Y) log dX dY = KL ( P(X,Y) || P(X)P(Y) ) P(X,Y) P(X)P(Y)

10 A choice of feature selection ranking methods depending on the nature of: the variables and the target (binary, categorical, continuous) the problem (dependencies between variables, linear/non- linear relationships between variables and target) the available data (number of examples and number of variables, noise in data) the available tabulated statistics. Other criteria ( chap. 3)

11 Multivariate Methods

12 Univariate selection may fail Guyon-Elisseeff, JMLR 2004; Springer 2006

13 Filters,Wrappers, and Embedded methods All features Filter Feature subset Predictor All features Wrapper Multiple Feature subsets Predictor All features Embedded method Feature subset Predictor

14 Relief nearest hit nearest miss D hit D miss Relief= D hit D miss Kira and Rendell, 1992

15 Wrappers for feature selection N features, 2 N possible feature subsets! Kohavi-John, 1997

16 Exhaustive search. Simulated annealing, genetic algorithms. Beam search: keep k best path at each step. Greedy search: forward selection or backward elimination. PTA(l,r): plus l, take away r – at each step, run SFS l times then SBS r times. Floating search (SFFS and SBFS): One step of SFS (resp. SBS), then SBS (resp. SFS) as long as we find better subsets than those of the same size obtained so far. Any time, if a better subset of the same size was already found, switch abruptly. n-k g Search Strategies ( chap. 4)

17 Forward Selection (wrapper) n n-1 n-2 1 … Start Also referred to as SFS: Sequential Forward Selection

18 Guided search: we do not consider alternative paths. Typical ex.: Gram-Schmidt orthog. and tree classifiers. Forward Selection (embedded) … Start n n-1 n-2 1

19 Backward Elimination (wrapper) 1 n-2 n-1 n … Start Also referred to as SBS: Sequential Backward Selection

20 Backward Elimination (embedded) … Start 1 n-2 n-1 n Guided search: we do not consider alternative paths. Typical ex.: “recursive feature elimination” RFE-SVM.

21 Scaling Factors Idea: Transform a discrete space into a continuous space. Discrete indicators of feature presence:  i  {0, 1} Continuous scaling factors:  i  IR  =[  1,  2,  3,  4 ] Now we can do gradient descent!

22 Many learning algorithms are cast into a minimization of some regularized functional: Empirical error Regularization capacity control Formalism ( chap. 5) Next few slides: André Elisseeff Justification of RFE and many other embedded methods.

23 Embedded method Embedded methods are a good inspiration to design new feature selection techniques for your own algorithms: –Find a functional that represents your prior knowledge about what a good model is. –Add the  weights into the functional and make sure it’s either differentiable or you can perform a sensitivity analysis efficiently –Optimize alternatively according to  and  –Use early stopping (validation set) or your own stopping criterion to stop and select the subset of features Embedded methods are therefore not too far from wrapper techniques and can be extended to multiclass, regression, etc…

24 The l 1 SVM A version of SVM where  (w)=||w|| 2 is replaced by the l 1 norm  (w)=  i |w i | Can be considered an embedded feature selection method: –Some weights will be drawn to zero (tend to remove redundant features) –Difference from the regular SVM where redundant features are included Bi et al 2003, Zhu et al, 2003

25 Replace the regularizer ||w|| 2 by the l 0 norm Further replace by  i log(  + |w i |) Boils down to the following multiplicative update algorithm: The l 0 SVM Weston et al, 2003

26 Causality

27 What can go wrong? Guyon-Aliferis-Elisseeff, 2007

28 What can go wrong?

29 Guyon-Aliferis-Elisseeff, 2007 X2X2 Y X1X1 Y X1X1 X2X2

30 http://clopinet.com/causality

31 Wrapping up

32 Bilevel optimization 1) For each feature subset, train predictor on training data. 2) Select the feature subset, which performs best on validation data. –Repeat and average if you want to reduce variance (cross- validation). 3) Test on test data. N variables/features M samples m1m1 m2m2 m3m3 Split data into 3 sets: training, validation, and test set.

33 Complexity of Feature Selection Generalization_error  Validation_error +  (C/m 2 ) m 2 : number of validation examples, N: total number of features, n: feature subset size. With high probability: n Error Try to keep C of the order of m 2.

34 CLOP http://clopinet.com/CLOP/ CLOP=Challenge Learning Object Package. Based on the Matlab® Spider package developed at the Max Planck Institute. Two basic abstractions: –Data object –Model object Typical script: –D = data(X,Y); % Data constructor –M = kridge; % Model constructor –[R, Mt] = train(M, D); % Train model=>Mt –Dt = data(Xt, Yt); % Test data constructor –Rt = test(Mt, Dt); % Test the model

35 NIPS 2003 FS challenge http://clopinet.com/isabelle/Projects/ETH/Feature_Selection_w_CLOP.html

36 Conclusion Feature selection focuses on uncovering subsets of variables X 1, X 2, … predictive of the target Y. Multivariate feature selection is in principle more powerful than univariate feature selection, but not always in practice. Taking a closer look at the type of dependencies in terms of causal relationships may help refining the notion of variable relevance.

37 1)Feature Extraction, Foundations and Applications I. Guyon et al, Eds. Springer, 2006. http://clopinet.com/fextract-book 2) Causal feature selection I. Guyon, C. Aliferis, A. Elisseeff To appear in “Computational Methods of Feature Selection”, Huan Liu and Hiroshi Motoda Eds., Chapman and Hall/CRC Press, 2007. http://clopinet.com/causality Acknowledgements and references


Download ppt "Feature selection methods Isabelle Guyon IPAM summer school on Mathematics in Brain Imaging. July 2008."

Similar presentations


Ads by Google