Download presentation

Presentation is loading. Please wait.

Published byKiera Balon Modified over 4 years ago

1
Dimensionality Reduction by Feature Selection in Machine Learning Dunja Mladenič J.Stefan Institute, Slovenia

2
Reasons for dimensionality reduction Dimensionality reduction in machine learning is usually performed to: Improve the prediction performance Improve learning efficiency Provide faster predictors possibly requesting less information on the original data Reduce complexity of the learned results, enable better understanding of the underlying process

3
Approaches to dimensionality reduction Map the original features onto the reduced dimensionality space by: selecting a subset of the original features no feature transformation, just select a feature subset constructing features to replace the original features using methods from statistics, such as, PCA using background knowledge for constructing new features to be used in addition/instead of the original features (can be followed by feature subset selection) general background knowledge (sum or product of features,...) domain specific background knowledge (parser for text data to get noun phrases, clustering of words, user-specified function,…) Addressed here

4
Example for the problem Data set Five Boolean features C = F 1 V F 2 F 3 = F 2, F 5 = F 4 Optimal subset: {F 1, F 2 } or {F 1, F 3 } optimization in space of all feature subsets ( possibilities) (tutorial on genomics [Yu 2004]) F1F1 F2F2 F3F3 F4F4 F5F5 C 001010 010011 101011 110011 001100 010101 101101 110101

5
Search for feature subset An example of search space (John & Kohavi 1997) Forward selection Backward elimination

6
Feature subset selection commonly used search strategies: forward selection FSubset={}; greedily add features one at a time forward stepwise selection FSubset={}; greedily add or remove features one at a time backward elimination FSubset=AllFeatures; greedily remove features one at a time backward stepwise elimination FSubset=AllFeatures; greedily add or remove features one at a time random mutation FSubset=RandomFeatures; greedily add or remove randomly selected feature one at a time stop after a given number of iterations

7
Approaches to feature subset selection Filters - evaluation function independent of the learning algorithm Wrappers - evaluation using model selection based on the machine learning algorithm Embedded approaches - feature selection during learning Simple Filters - assume feature independence (used for problems with large number of features, eg. text classification)

8
Filtering Evaluation independent of ML algorithm

9
Filters: Distribution-based [Koller & Sahami 1996] Idea: select a minimal subset of features that keeps class probability distribution close to the original distribution P(C|FeatureSet) is close to P(C|AllFeatures) 1. start with all the features 2. use backward elimination to eliminate a predefined number of features evaluation: the next feature to be deleted is obtained using Cross-entropy measure

10
Evaluation of a feature subset 1. represent examples using the feature subset 2. on a random subset of examples calculate average difference in distance from the nearest example of the same class and the nearest example of the different class F discrete F cont. some extensions, empirical and theoretical analysis in [Robnik-Sikonja & Kononenko 2003] Filters: Relief [Kira & Rendell 1992]

11
Filters: FOCUS [Almallim & Dietterich 1991] Evaluation of a feature subset 1. represent examples using the feature subset 2. count conflicts in class value (two examples with the same feature values and different class value) Search: all the (promising) subsets of the same (increasing) size are evaluated until a sufficient (no conflicts) subset is found assumes existence of a small sufficient subset --> not appropriate for tasks with many features some extensions of the algorithm use heuristic search to avoid evaluating all the subsets of the same size

12
Illustration of FOCUS F1F1 F2F2 F3F3 F4F4 F5F5 C 001010 010011 101011 110011 001100 010101 101101 110101 F4F4 F5F5 C 010 011 011 011 100 101 101 101 Conflict!

13
Filters: Random [ Liu & Setiono 1996 ] Evaluation of a feature subset 1. represent examples using the feature subset 2. calculate the inconsistency rate (the average difference between the number of examples with equal feature values and the number of examples among them with the locally, most frequent class value) 3. select the smallest subset with inconsistency rate below the given threshold Search: random sampling to search the space of feature subsets evaluate the predetermined number of subsets noise handling by setting the threshold > 0 if threshold = 0, then the same evaluation as in FOCUS

14
Filters: MDL-based [ Pfahringer 1995 ] Evaluation using Minimum Description Length 1. represent examples using the feature subset 2. calculate MDL of a simple decision table representing examples Search: start with random feature subset and add or delete a feature, one at a time performs at least as well as the wrapper approach applied on the simple decision tables and scales up better to large number of training examples

15
Wrapper Evaluation uses the same ML algorithm that is used after the feature selection

16
Wrappers: Instance-based learning Evaluation using instance-based learning represent examples using the feature subset estimate model quality using cross-validation Search [Aha & Bankert 1994] start with random feature subset use beam search with backward elimination Search [Skalak 1994] start with random feature subset use random mutation

17
Wrappers: Decision tree induction Evaluation using decision tree induction represent examples using the feature subset estimate model quality using cross-validation Search [Bala et al 1995], [Cherkauer & Shavlik 1996] using genetic algorithm Search [Caruana & Freitag 1994] adding and removing features (backward stepwise elimination) additionally, at each step removes all the features that were not used in the decision tree induced for the evaluation of the current feature subset

18
Metric-based model selection Idea:poor models behave differently on training and other data Evaluation using machine learning algorithm represent examples using the feature subset generate model using some ML algorithm estimate model quality comparing the performance of two models on training and on unlabeled data, chose the largest subset that satisfies triangular inequality with all the smaller subsets Combine metric and cross-validation [Bengio & Chapados 2003] based on their disagreement on testing examples (higher disagreement means lower trust to cross-validation) Intuition: cross-validation provides good results but has high variance and should benefit from a combination with model selection having with lower variance

19
Embedded Feature selection as integral part of model generation

20
Embedded at each iteration of the incremental optimization of the model use a fast gradient-based heuristic to find the most promising feature [Perkins et al 2003] Idea: features that are relevant to the concept should affect the generalization error bound of non-linear SVM more than irrelevant features use backward elimination based on the criteria derived from generalization error bounds of the SVM theory (the weight vector norm or, using upper bounds of the leave-one-out error) [Rakotomamonjy 2003]

21
Embedded: in filters [Cardie 1993] Use embedded feature selection as pre-processing evaluation and search using the process embedded in decision tree induction the final feature subset contains only the features that appear in the induced decision tree used for learning using Nearest Neighbor algorithm

22
Simple Filtering Evaluation independent of ML algorithm

23
Feature subset selection on text data – commonly used methods Simple filtering using some scoring measure to evaluate individual feature supervised measures: information gain, cross entropy for text (information gain on only one feature value), mutual information for text supervised measures for binary class odds ratio (target class vs. the rest), bi-normal separation unsupervised measures: term frequency, document frequency Simple filtering using embedded approach to score the features scoring measure equal to weights in the normal to the hyperplane of linear SVM trained on all the features [Brank et al 2002] learning using linear SVM, Perceptron, Naïve Bayes

24
Scoring individual feature InformationGain: CrossEntropyTxt: MutualInfoTxt: OddsRatio: Frequency: Bi-NormalSeparation: F - Normal distribution cumulative probability function

25
Influence of feature selection on the classification performance Some ML algorithms are more sensitive to the feature subset than other Naïve Bayes on document categorization sensitive to the feature subset Linear SVM has embedded weighting of features that partially compensates for feature selection

26
Illustration of feature selection Naïve Bayes on Yahoo! hierarchy data Comparison of different feature scoring measures in simple filtering Linear SVM on standard Reuters-2000 news data Comparison of scoring measures including embedded SVM-normal and perceptron used as pre-processing

27
Illustration on 5 datasets from Yahoo! hierarchy using Naïve Bayes [Mladenic & Grobelnik 2003]

28
OddsRatio CrossEntropy MutualInf Random InfGain Feature subset size importantly influences the performance Some measures more sensitive than other

29
Rank of the correct category in the list of all categories F2-measure combining precision and recall emphases on recall Ctgs – number of categories looking promising (testing example needs to be classified by their models) best results: Odds ratio using only a small number of features (50-100, 0.2%-5%) improves performance of Naïve Bayes surprisingly good results: unsupervised Term frequency poor results: Information gain probably because it is not compatible with Naïve Bayes (selects mostly features representative for neg. class and features informative when not occurring in the document)

30
Illustration on Reuters-2000 Data [Brank et al 2002] Reuters-2000 Data used in the experiments 16 categories covering the range of break-event point (estimated on a sample) and class distribution Training: sample of 118,294 articles from the training period Testing: 302,323 articles from the test period ~810,000 News articles 103 Categories 20. Aug,1996 19. Aug,1997 14. April,1997 Training Period Test Period 504,468 articles 302,323 articles

31
Experiments with Naïve Bayes Classifier Benefits from feature selection SVM-normal gives the best performance InfoGain OddsRatio SVM Normal PercNormal

32
Average number of nonzero components per vector instead of the overall no. of features The same results showing F1 vs. sparsity of the document vectors represented wiht the selected features InfoGain OddsRatio SVM Normal PercNormal

33
Experiments with Perceptron Classifier Does not benefit from feature selection Perceptron and SVM Normal feature selection give comparable performance InfoGain OddsRatio SVM Normal PercNormal

34
Experiments with the Linear SVM Classifier Does not benefit from feature selection SVM-normal the best performance InfoGain OddsRatio SVM Normal PercNormal

35
Discussion Using discarded features can help The features that harm performance if used as input were found to improve performance if used as additional output obtain additional information by introducing mapping from the selected features to the discarded features (the multitask learning setting [Caruana de Sa 2003]) experiments on synthetic regression and classification problems and real-world medical data have shown improvements in performance Intuition: transfer of information occurs inside the model, when in addition to the class value it models also additional output consisting of the discarded features

36
Discussion Feature subset selection as pre-processing ignore interaction with the target learning algorithm Simple Filters – work for large number of features assume feature independence, limited results the size of feature subset to be determined Filters – search space of size, can not handle many features relay on general data characteristics (consistency, distance, class distribution) use the target learning algorithm for evaluation Wrappers – high accuracy, computationally expensive use model selection with cross-validation of the target algorithm, similar to metric-based model selection (eg., comparing output on training and on unlabeled data) Feature subset selection during learning use the target learning algorithm during feature selection Embedded – can be used by filters to find the feature subset

Similar presentations

OK

Chapter 7: Transformations. Attribute Selection Adding irrelevant attributes confuses learning algorithms---so avoid such attributes Both divide-and-conquer.

Chapter 7: Transformations. Attribute Selection Adding irrelevant attributes confuses learning algorithms---so avoid such attributes Both divide-and-conquer.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google

Ppt on indian construction industry Ppt on water pollution management Ppt on review of related literature samples Ppt on content development examples Ppt on soft skills download Ppt on company act 1956 of india Ppt on interesting facts about maths Ppt on magnetic lines of force Ppt on astronomy and astrophysics Animal sounds for kids ppt on batteries