Download presentation
Presentation is loading. Please wait.
Published byProsper Haynes Modified over 9 years ago
1
580.691 Learning Theory Reza Shadmehr logistic regression, iterative re-weighted least squares
2
Logistic regression In the last lecture we classified by computing a posterior probability. The posterior was calculated by modeling the likelihood and prior for each class. To compute the posterior, we modeled the right side of the equation below by assuming that they were Gaussians and computed their parameters (or used a kernel estimate of the density). In logistic regression, we want to directly model the posterior as a function of the variable x. In practice, when there are k classes to classify, we model:
3
In this example we assume that the two distributions for the classes have equal variance. Suppose we want to classify a person as male or female based on height. Height is normally distributed in the population of men and in the population of women, with different means, and similar variances. Let y be an indicator variable for being a female. Then the conditional distribution of x (the height becomes): What we have: What we want: Classification by maximizing the posterior distribution
4
Posterior probability for classification when we have two classes:
5
Computing the probability that the subject is female, given that we observed height x. 120140160180200220 0.2 0.4 0.6 0.8 1 Posterior: a logistic function In the denominator, x appears linearly inside the exponential So if we assume that the class membership densities p(x/y) are normal with equal variance, then the posterior probability will be a logistic function.
6
Logistic regression with assumption of equal variance among density of classes implies a linear decision boundary Class 0
7
Assumption of equal variance among the clusters The goal is to find parameters w that maximize the log-likelihood. Logistic regression: problem statement
8
Some useful properties of the logistic function
9
Online algorithm for logistic regression
10
Batch algorithm: Iteratively Re-weighted Least Squares
11
Iteratively Re-weighted Least Squares IRLS 0.20.40.60.8 5 6 7 8 9 10 11 uncertain certain Sensitivity to error
12
Iteratively Re-weighted Least Square: Example
13
Modeling the posterior when the densities have unequal variance (uni-variate case with two classes)
14
Logistic regression with basis functions By using non-linear bases, we can deal with clusters having unequal variance. Estimated posterior probability
15
Logistic function for multiple classes with equal variance Rather than modeling the posterior directly, let us pick the posterior for one class as our reference and then model the ratio of the posterior for all other classes with respect to that class. Suppose we have k classes:
16
Logistic function for multiple classes with equal variance: soft-max A “soft-max” function
17
Classification of multiple classes with equal variance 160180200220 0.0025 0.005 0.0075 0.01 0.0125 0.015 160180200220 0.005 0.01 0.015 0.02 0.025 160180200220 0.2 0.4 0.6 0.8 1 Posterior probabilities 160180200220 -15 -10 -5 5 10 15
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.