1 Linear Methods for Classification Lecture Notes for CMPUT 466/551 Nilanjan Ray.

Slides:



Advertisements
Similar presentations
Component Analysis (Review)
Advertisements

Pattern Recognition and Machine Learning
ECE 8443 – Pattern Recognition LECTURE 05: MAXIMUM LIKELIHOOD ESTIMATION Objectives: Discrete Features Maximum Likelihood Resources: D.H.S: Chapter 3 (Part.
CS479/679 Pattern Recognition Dr. George Bebis
Face Recognition Ying Wu Electrical and Computer Engineering Northwestern University, Evanston, IL
Pattern Classification. Chapter 2 (Part 1): Bayesian Decision Theory (Sections ) Introduction Bayesian Decision Theory–Continuous Features.
Chapter 4: Linear Models for Classification
Visual Recognition Tutorial
Support Vector Machines
Lecture Notes for CMPUT 466/551 Nilanjan Ray
0 Pattern Classification All materials in these slides were taken from Pattern Classification (2nd ed) by R. O. Duda, P. E. Hart and D. G. Stork, John.
Maximum likelihood Conditional distribution and likelihood Maximum likelihood estimations Information in the data and likelihood Observed and Fisher’s.
Logistic Regression Rong Jin. Logistic Regression Model  In Gaussian generative model:  Generalize the ratio to a linear model Parameters: w and c.
Announcements  Homework 4 is due on this Thursday (02/27/2004)  Project proposal is due on 03/02.
Statistical Decision Theory, Bayes Classifier
Linear Methods for Classification
1 Linear Classification Problem Two approaches: -Fisher’s Linear Discriminant Analysis -Logistic regression model.
Review Rong Jin. Comparison of Different Classification Models  The goal of all classifiers Predicating class label y for an input x Estimate p(y|x)
METU Informatics Institute Min 720 Pattern Classification with Bio-Medical Applications PART 2: Statistical Pattern Classification: Optimal Classification.
Probability of Error Feature vectors typically have dimensions greater than 50. Classification accuracy depends upon the dimensionality and the amount.
Classification (Supervised Clustering) Naomi Altman Nov '06.
Principles of Pattern Recognition
Speech Recognition Pattern Classification. 22 September 2015Veton Këpuska2 Pattern Classification  Introduction  Parametric classifiers  Semi-parametric.
ECE 8443 – Pattern Recognition LECTURE 03: GAUSSIAN CLASSIFIERS Objectives: Normal Distributions Whitening Transformations Linear Discriminants Resources.
Learning Theory Reza Shadmehr logistic regression, iterative re-weighted least squares.
CS 782 – Machine Learning Lecture 4 Linear Models for Classification  Probabilistic generative models  Probabilistic discriminative models.
Machine Learning – Lecture 6
Ch 4. Linear Models for Classification (1/2) Pattern Recognition and Machine Learning, C. M. Bishop, Summarized and revised by Hee-Woong Lim.
ECE 8443 – Pattern Recognition LECTURE 10: HETEROSCEDASTIC LINEAR DISCRIMINANT ANALYSIS AND INDEPENDENT COMPONENT ANALYSIS Objectives: Generalization of.
Computational Intelligence: Methods and Applications Lecture 23 Logistic discrimination and support vectors Włodzisław Duch Dept. of Informatics, UMK Google:
Machine Learning CUNY Graduate Center Lecture 4: Logistic Regression.
ECE 8443 – Pattern Recognition LECTURE 08: DIMENSIONALITY, PRINCIPAL COMPONENTS ANALYSIS Objectives: Data Considerations Computational Complexity Overfitting.
Chapter 3: Maximum-Likelihood Parameter Estimation l Introduction l Maximum-Likelihood Estimation l Multivariate Case: unknown , known  l Univariate.
ECE 471/571 – Lecture 6 Dimensionality Reduction – Fisher’s Linear Discriminant 09/08/15.
Linear Models for Classification
Discriminant Analysis
Linear Methods for Classification : Presentation for MA seminar in statistics Eli Dahan.
1  The Problem: Consider a two class task with ω 1, ω 2   LINEAR CLASSIFIERS.
Over-fitting and Regularization Chapter 4 textbook Lectures 11 and 12 on amlbook.com.
Elements of Pattern Recognition CNS/EE Lecture 5 M. Weber P. Perona.
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition LECTURE 12: Advanced Discriminant Analysis Objectives:
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition LECTURE 04: GAUSSIAN CLASSIFIERS Objectives: Whitening.
Linear Classifiers Dept. Computer Science & Engineering, Shanghai Jiao Tong University.
LECTURE 07: CLASSIFICATION PT. 3 February 15, 2016 SDS 293 Machine Learning.
Giansalvo EXIN Cirrincione unit #4 Single-layer networks They directly compute linear discriminant functions using the TS without need of determining.
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition LECTURE 09: Discriminant Analysis Objectives: Principal.
Linear Classifier Team teaching.
Computational Intelligence: Methods and Applications Lecture 22 Linear discrimination - variants Włodzisław Duch Dept. of Informatics, UMK Google: W Duch.
Part 3: Estimation of Parameters. Estimation of Parameters Most of the time, we have random samples but not the densities given. If the parametric form.
PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 1: INTRODUCTION.
Lecture 2. Bayesian Decision Theory
Probability Theory and Parameter Estimation I
LECTURE 11: Advanced Discriminant Analysis
Logistic Regression Gary Cottrell 6/8/2018
LECTURE 09: BAYESIAN ESTIMATION (Cont.)
LECTURE 10: DISCRIMINANT ANALYSIS
CH 5: Multivariate Methods
Classification Discriminant Analysis
Classification Discriminant Analysis
REMOTE SENSING Multispectral Image Classification
Mathematical Foundations of BME Reza Shadmehr
Generally Discriminant Analysis
Mathematical Foundations of BME
LECTURE 09: DISCRIMINANT ANALYSIS
Parametric Methods Berlin Chen, 2005 References:
Learning From Observed Data
Multivariate Methods Berlin Chen
Multivariate Methods Berlin Chen, 2005 References:
Linear Discrimination
Hairong Qi, Gonzalez Family Professor
Presentation transcript:

1 Linear Methods for Classification Lecture Notes for CMPUT 466/551 Nilanjan Ray

2 Linear Classification What is meant by linear classification? –The decision boundaries in the in the feature (input) space is linear Should the regions be contiguous? R1R1 R2R2 R3R3 R4R4 X1X1 X2X2 Piecewise linear decision boundaries in 2D input space

3 Linear Classification… There is a discriminant function  k (x) for each class k Classification rule: In higher dimensional space the decision boundaries are piecewise hyperplanar Remember that 0-1 loss function led to the classification rule: So, can serve as  k (x)

4 Linear Classification… All we require here is the class boundaries {x:  k (x) =  j (x)} be linear for every (k, j) pair One can achieve this if  k (x) themselves are linear or any monotone transform of  k (x) is linear –An example: Linear So that

5 Linear Classification as a Linear Regression 2D Input space: X = (X 1, X 2 ) Number of classes/categories K=3, So output Y = (Y 1, Y 2, Y 3 ) Training sample, size N=5, Regression output: Each row has exactly one 1 indicating the category/class Indicator Matrix Or, Classification rule:

6 The Masking Linear regression of the indicator matrix can lead to masking LDA can avoid this masking 2D input space and three classes Masking Viewing direction

7 Linear Discriminant Analysis Essentially minimum error Bayes’ classifier Assumes that the conditional class densities are (multivariate) Gaussian Assumes equal covariance for every class Posterior probability  k is the prior probability for class k f k (x) is class conditional density or likelihood density Application of Bayes rule

8 LDA… Classification rule: is equivalent to: The good old Bayes classifier!

9 LDA… Training data utilized to estimate Prior probabilities: Means: Covariance matrix: When are we going to use the training data? Total N input-output pairs N k number of pairs in class k Total number of classes: K

10 LDA: Example LDA was able to avoid masking here

11 Quadratic Discriminant Analysis Relaxes the same covariance assumption– class conditional probability densities (still multivariate Gaussians) are allowed to have different covariant matrices The class decision boundaries are not linear rather quadratic

12 QDA and Masking Better than Linear Regression in terms of handling masking: Usually computationally more expensive than LDA

13 Fisher’s Linear Discriminant [DHS] From training set we want to find out a direction where the separation between the class means is high and overlap between the classes is small

14 Fisher’s LD… Projection of a vector x on a unit vector w: Geometric interpretation: From training set we want to find out a direction w where the separation between the projections of class means is high and the projections of the class overlap is small

15 Fisher’s LD… Class means: Projected class means: Difference between projected class means: Scatter of projected data (this will indicate overlap between the classes):

16 Fisher’s LD… Ratio of difference of projected means over total scatter: where We want to maximize r(w). The solution is Rayleigh quotient

17 Fisher’s LD: Classifier Classification rule: x in R 2 if y(x)>0, else x in R 1, where So far so good. However, how do we get the classifier? All we know at this point is that the direction separates the projected data very well Since we know that the projected class means are well separated, we can choose average of the two projected means as a threshold for classification

18 Fisher’s LD: Multiple Classes Maximize Rayleigh ratio: The solution largest eigenvector of is Compute means for the classes: There are k clases C 1,…,C k with number of elements n i in the i th class Compute variances: Compute the grand mean: At most (k-1) eigenvalues will be non-zero. Dimensionality reduction.

19 Fisher’s LD and LDA They become same when (1)Prior probabilities are same (2)Common covariance matrix for the class conditional densities (3)Both class conditional densities are multivariate Gaussian Ex. Show that Fisher’s LD classifier and LDA produce the same rule of classification given the above assumptions Note: (1) Fisher’s LD does not assume Gaussian densities (2) Fisher’s LD can be used in dimension reduction for a multiple class scenario

20 Logistic Regression The output of regression is the posterior probability i.e., Pr(output | input) Always ensures that the sum of output variables is 1 and each output is non-negative A linear classification method We need to know about two concepts to understand logistic regression –Newton-Raphson method –Maximum likelihood estimation

21 Newton-Raphson Method A technique for solving non-linear equation f(x)=0 Taylor series: After rearrangement: If x n+1 is a root or very close to the root, then: So: Rule for iteration Need an initial guess x 0

22 Newton-Raphson in Multi-dimensions We want to solve the equations: Taylor series: After some rearrangement etc. the rule for iteration: (Need an initial guess) Jacobian matrix

23 Newton-Raphson : Example Solve: Iteration rule need initial guess

24 Maximum Likelihood Parameter Estimation Let’s start with an example. We want to find out the unknown parameters mean and standard deviation of a Gaussian pdf, given N independent samples from it. Samples: x 1,….,x N Form the likelihood function: Estimate the parameters that maximize the likelihood function Let’s find out

25 Logistic Regression Model The method directly models the posterior probabilities as the output of regression Note that the class boundaries are linear How can we show this linear nature? What is the discriminant function for every class in this model?

26 Logistic Regression Computation Let’s fit the logistic regression model for K=2, i.e., number of classes is 2 Training set: (x i, g i ), i=1,…,N Log-likelihood: We want to maximize the log-likelihood in order to estimate 

27 Logistic Regression Computation… (p+1) Non-linear equations Solve by Newton-Raphson method: Let’s workout the details hidden in the above equation. In the process we’ll learn a bit about vector differentiation etc.