Fewer attributes are better if they are optimal

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

CPSC 502, Lecture 15Slide 1 Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 15 Nov, 1, 2011 Slide credit: C. Conati, S.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Universidad de los Andes-CODENSA The Continuous Genetic Algorithm.
Genetic Algorithm.
Evolutionary Intelligence
Efficient Model Selection for Support Vector Machines
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
GA-Based Feature Selection and Parameter Optimization for Support Vector Machine Cheng-Lung Huang, Chieh-Jen Wang Expert Systems with Applications, Volume.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Chapter 8 The k-Means Algorithm and Genetic Algorithm.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Computational Complexity Jang, HaYoung BioIntelligence Lab.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Over-fitting and Regularization Chapter 4 textbook Lectures 11 and 12 on amlbook.com.
GENETIC ALGORITHM Basic Algorithm begin set time t = 0;
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Intro. ANN & Fuzzy Systems Lecture 16. Classification (II): Practical Considerations.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Genetic Algorithms Schematic of neural network application to identify metabolites by mass spectrometry (MS) Developed by Dr. Lars Kangas Input to Genetic.
Hybrid Ant Colony Optimization-Support Vector Machine using Weighted Ranking for Feature Selection and Classification.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Intelligent Exploration for Genetic Algorithms Using Self-Organizing.
Genetic Programming.
Introduction to Genetic Algorithms
Chapter 14 Genetic Algorithms.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Genetic Algorithms.
Artificial Intelligence Methods (AIM)
Introduction to Genetic Algorithm (GA)
CSC 380: Design and Analysis of Algorithms
Presenter: Randy Hunt Presenter: Vitaliy Krestnikov
Advanced Artificial Intelligence Feature Selection
Modified Crossover Operator Approach for Evolutionary Optimization
Basics of Genetic Algorithms (MidTerm – only in RED material)
Genetic Algorithms Chapter 3.
Basics of Genetic Algorithms
EE368 Soft Computing Genetic Algorithms.
Somi Jacob and Christian Bach
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Genetic Programming Chapter 6.
Review for test #2 Fundamentals of ANN Dimensionality reduction
Genetic Programming Chapter 6.
Chapter 7: Transformations
Feature Selection Methods
Genetic Programming Chapter 6.
Assignment 1: Classification by K Nearest Neighbors (KNN) technique
Objective 1: Use Weka’s WrapperSubsetEval (Naïve Bayes
Population Based Metaheuristics
CSC 380: Design and Analysis of Algorithms
Population Methods.
Presentation transcript:

Fewer attributes are better if they are optimal Weka’s Logistic Regression a       b 143  17     |  a=0 29    108   |   b=1 Weka’s Logistic with the same set of attributes that gave the best result in Simple Logistic

Feature Selection by Genetic algorithm and Information Gained Feature selection: Chose k<d important features, ignore the remaining d – k Feature extraction: Project the original d attributes onto a new k<d dimensional feature space Principal components analysis (PCA), Linear discriminant analysis (LDA), Factor analysis (FA) Auto-association ANN 2

Very Brief History of genetic algorithms: Genetic Algorithms were developed by John Holland in 60’s and 70’s Author of “Adaption in Natural and Artificial Systems” More recent book on the subject “An Introduction to Genetic Algorithms” by Melanie Mitchell (MIT Press, Cambridge, MA, 2002)

Natural adaption: Populations of organisms are subjected to environmental stress. Fitness is manifest by ability to survive and reproduce Fitness is passed to offspring by genes that are organized on chromosomes. If environmental conditions change, evolution creates a new population with different characteristics that optimize fitness under the new conditions

Basic tools of evolution Recombination (crossover) occurs during reproduction. Chromosomes of offspring are a mixture of chromosomes from parents Mutation changes a single gene within a chromosome. To be expressed, organism must survive and pass modified chromosome to offspring

Artificial adaptation : Represent a candidate solution to a problem by a chromosome Define a fitness function on the domain of all chromosomes Define the probabilities of crossover and mutation. Select 2 chromosomes for reproduction based on their fitness Produce new chromosomes by crossover and mutation Evaluate fitness of new chromosomes Completes a “generation”

Artificial adaptation continued: In 50-500 generations create a population of solutions with high fitness Repeat whole process several times and merge best solutions Simple example: Find the position of the maximum of a normal distribution with mean of 16 and standard deviation of 4

Fitness function Obvious that maximum is at 16. How can we will discover this by GA.

Problem set up Chromosome = binary representation of integers between 0 and 31 (requires 5 bits) 0 to 31 covers the range where fitness is significantly different from zero Fitness of chromosome = value of fitness function f(x) where x is the integer equivalent of a 5-bit binary Crossover probability (rate) = 0.75 Mutation probability (rate) = 0.002 Size of population, n = 4

Selecting chromosomes for refinement Calculate fitness f(xi) for each chromosome in population Assigned each chromosome a discrete probability by Use pi to design a “roulette wheel” Divide number line between 0 and 1 into segments of length pi in a specified order Get r, random number uniformly distributed between 0 and 1 Choose the chromosome of the line segment containing r

1st generation: 5-bit binary numbers chosen randomly 00100 = 4 fitness = 0.0011 pi = 0.044 01001 = 9 fitness = 0.0216 pi = 0.861 11011 = 27 fitness = 0.0023 pi = 0.091 11111 = 31 fitness = 0.0001 pi = 0.004 Si f(xi) = 0.0251 Assume that “roulette wheel” method selected the pair of chromosomes with greatest fitness (01001 and 11011).

Crossover selected to induce change Assume a mixing point (locus) is chosen between first and second bit. Mutation is rejected as method to induce change

Evaluate fitness of new population 00100 = 4 fitness = 0.0011 pi = 0.0201 01011 = 11 fitness = 0.0457 pi = 0.8339 11001 = 25 fitness = 0.0079 pi = 0.1442 11111 = 31 fitness = 0.0001 pi = 0.0018 Si f(xi) = 0.0548 about 2 times that of the 1st generation Repeat until fitness of population is almost uniform Values of all chromosomes should be near 16

Crowding: In the initial chromosome population of this example 01001 has 86% of the selection probability. Potentially can lead to imbalance of fitness over diversity Limits the ability of GA to explore new regions of search space Solution: penalize choice of similar chromosomes for mating

Sigma scaling allows variable selection pressure Sigma scaling of fitness f(x) m and s are the mean and standard deviation of fitness in the population In early generations, selection pressure should be low to enable wider coverage of search space (large s) In later generations selection pressure should be higher to encourage convergence to optimum solution (small s)

Positional bias: Single-point crossover lets near-by loci stay together in children One of several methods to avoid positional bias

Genetic Algorithm for real-valued variables Real-valued variables can be converted to binary representation as in example of finding maximum of normal distribution. Results in loss of significance unless one uses a large number of bits Arithmetic crossover Parents <x1, x2,…xn> and <y1, y2, …yn> Choose kth gene at random Children <x1, x2,…ayk +(1-a)xk,…xn> <y1, y2,…axk +(1-a)yk,…yn> 0 < a <1

More methods for real-valued variables Discrete crossover: With uniform probability, each gene of child chromosome chosen to be a gene in one or the other parent chromosomes at the same locus. Parents <0.5, 1.0, 1.5, 2.0> and <0.2, 0.7, 0.2, 0.7> Child <0.2, 0.7, 1.5, 0.7> Normally distributed mutation: Choose random number from normal distribution with zero mean and standard deviation comparable to size of genes (e.g. s = 1 for genes scaled between -1 and +1). Add to randomly chosen gene. Re-scale if needed.

Using GA in training of ANN ANN with 11 weights: 8 to hidden layer, 3 to output w1A w1B w2A w2B w3A w3B w0A w0B wAZ wBZ w0Z

Chromosome for weight optimization by GA < w1A w1B w2A w2B w3A w3B w0A w0B wAZ wBZ w0Z > Scaled to values between -1 and +1 Use methods crossover and mutation for real numbers to modify chromosome Fitness function: mean squared deviation between output and target

Use feed forward to determine the fitness of this new chromosome

Genetic algorithm for attribute selection Find the best subset of attributes for data mining GA is well suited to this task since, with diversity, it can explore many combinations of attributes.

WEKA’s GA applied to attribute selection Default values: Population size = 20 Crossover probability = 0.6 Mutation probability = 0.033 Example: breast-cancer classification Wisconsin Breast Cancer Database Breast-cancer.arff 683 instances 9 numerical attributes 2 target classes benign=2 malignant=4

Severity scores are attributes Last number in a row is class label Examples of records from dataset Severity scores 5,1,1,1,2,1,3,1,1,2 5,4,4,5,7,10,3,2,1,2 3,1,1,1,2,2,3,1,1,2 6,8,8,1,3,4,3,7,1,2 4,1,1,3,2,1,3,1,1,2 8,10,10,8,7,10,9,7,1,4 1,1,1,1,2,10,3,1,1,2 2,1,2,1,2,1,3,1,1,2 2,1,1,1,2,1,1,1,5,2 4,2,1,1,2,1,2,1,1,2 Tumor characteristics clump-thickness uniform-cell size uniform-cell shape marg-adhesion single-cell size bare-nuclei bland-chomatin normal-nucleoli mitoses Severity scores are attributes Last number in a row is class label

Chromosomes have 9 binary genes Severity score 5,1,1,1,2,1,3,1,1,2 5,4,4,5,7,10,3,2,1,2 3,1,1,1,2,2,3,1,1,2 6,8,8,1,3,4,3,7,1,2 4,1,1,3,2,1,3,1,1,2 8,10,10,8,7,10,9,7,1,4 1,1,1,1,2,10,3,1,1,2 2,1,2,1,2,1,3,1,1,2 2,1,1,1,2,1,1,1,5,2 4,2,1,1,2,1,2,1,1,2 Characteristic clump-thickness uniform-cell size uniform-cell shape marg-adhesion single-cell size bare-nuclei bland-chomatin normal-nucleoli mitoses Chromosomes have 9 binary genes genek = 1 means kth severity score included Fitness: accuracy of naïve Bayes classification

Open file breast-cancer.arff Attribute selection using WEKA’s genetic algorithm method Open file breast-cancer.arff Check attribute 10 (class) to see the number of examples in each class

benign malignant

Open file breast-cancer.arff Attribute selection using WEKA’s genetic algorithm method Open file breast-cancer.arff Click on attribute 10 (class) to see the number of examples in each class Click on any other attribute.

clump thickness increasing severity  Distribution of severity scores (1 – 10) over examples in dataset Severity of clump thickness positively correlated with malignancy

Baseline performance measures use naïve Bayes classifier

Under the Select-Attributes tab of Weka Explorer Press choose button under Attribute Evaluator Under Attribute Selection find WrapperSubsetEval

Click on WrapperSubsetEval to bring up dialog box which shows ZeroR as the default classifier Find the Naïve Bayes classifier, click OK Evaluator has been selected

Under the Select-Attribute tab of Weka Explorer Press choose button under Search Method Find Genetic Search (see package manager in Weka 3.7) Start search with default settings including “Use full training set”

How is subset related to chromosome? Fitness function: linear scaling of the error rate of naïve Bayes classification such that the highest error rate corresponds to a fitness of zero

Results with Weka 3.6 Note repeats of most fit chromosome Subsets that include 9th attribute have low fitness

Increasing the number of generations to 100 does not change the attributes selected 9th attribute “mitoses” has been deselected Return to Preprocess tab, remove “mitoses” and reclassify

Performance with reduced attribute set is slightly improved Slight improvement Misclassified malignant cases decreased by 2

Weka has other attribute selection techniques For theory see http://en.wikipedia.org/wiki/Feature_selection “information gained” is alternative to SubSetEval with GA search Ranker is the only Search Method that can be used with InfoGainAttributeEval

Assignment 6: due 11-14-17 Attribute selection by GA: Repeat work shown in slides using Weka 3.8. Compare generation 20 with Weka 3.6 result. Report baseline result using naïve Bayes classifier with all attributes, conclusion from generation 20 if different from conclusion in slides based on Weka 3.6, result using naïve Bayes classifier with optimum attributes. b) Use the information-gain ranking filter on the leukemia gene expression dataset from assignment #1to find the top-5 genes. Use IBk (K=5) with these 5 attributes to classify AML vs ALL. Compare performance with results from HW1 where all genes were used for classification. Report following output: 1) % of correctly classified instances 2) TP and FP rates for ALL from the confusion matrix. 3) Confusion matrix when AML is treated as the positive class 4) TP and FP rates for AML from the new confusion matrix