PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 2: PROBABILITY DISTRIBUTIONS

Similar documents
Curve Fitting Re-visited, Bishop1.2.5

PROBABILITY DISTRIBUTIONS. J. Elder CSE 6390/PSYC 6225 Computational Modeling of Visual Perception

Pattern Recognition and Machine Learning. Bishop Chapter 2: Probability Distributions

Bayesian Models in Machine Learning

Probabilistic modeling. The slides are closely adapted from Subhransu Maji s slides

BAYESIAN DECISION THEORY

ECE285/SIO209, Machine learning for physical applications, Spring 2017

Bayesian Learning (II)

Pattern Recognition and Machine Learning

INTRODUCTION TO BAYESIAN INFERENCE PART 2 CHRIS BISHOP

Stat 5101 Lecture Notes

Some slides from Carlos Guestrin, Luke Zettlemoyer & K Gajos 2

Machine Learning Overview

Introduction to Probabilistic Machine Learning

Bayesian Methods for Machine Learning

Bayesian Learning. HT2015: SC4 Statistical Data Mining and Machine Learning. Maximum Likelihood Principle. The Bayesian Learning Framework

Machine Learning. Nonparametric Methods. Space of ML Problems. Todo. Histograms. Instance-Based Learning (aka non-parametric methods)

Machine Learning using Bayesian Approaches

Machine Learning CMPT 726 Simon Fraser University. Binomial Parameter Estimation

Naïve Bayes classification

STA 4273H: Statistical Machine Learning

The Bayes classifier

Density Estimation. Seungjin Choi

Learning Bayesian network : Given structure and completely observed data

Naïve Bayes classification. p ij 11/15/16. Probability theory. Probability theory. Probability theory. X P (X = x i )=1 i. Marginal Probability

Parametric Inference Maximum Likelihood Inference Exponential Families Expectation Maximization (EM) Bayesian Inference Statistical Decison Theory

Machine Learning Lecture 3

Lecture 2: Conjugate priors

Bayesian Methods: Naïve Bayes

Outline. Binomial, Multinomial, Normal, Beta, Dirichlet. Posterior mean, MAP, credible interval, posterior distribution

CSC321 Lecture 18: Learning Probabilistic Models

ECE521 week 3: 23/26 January 2017

Nonparametric Bayesian Methods (Gaussian Processes)

Probability Theory for Machine Learning. Chris Cremer September 2015

Classical and Bayesian inference

Generative Models for Discrete Data

Introduction to Machine Learning. Maximum Likelihood and Bayesian Inference. Lecturers: Eran Halperin, Lior Wolf

MLE/MAP + Naïve Bayes

STA 4273H: Statistical Machine Learning

NPFL108 Bayesian inference. Introduction. Filip Jurčíček. Institute of Formal and Applied Linguistics Charles University in Prague Czech Republic

Ch 4. Linear Models for Classification

Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen. Bayesian Learning. Tobias Scheffer, Niels Landwehr

Naïve Bayes Introduction to Machine Learning. Matt Gormley Lecture 18 Oct. 31, 2018

STA414/2104 Statistical Methods for Machine Learning II

Maximum Likelihood Estimation. only training data is available to design a classifier

Machine Learning for Signal Processing Bayes Classification and Regression

Non-parametric Methods

Introduction: MLE, MAP, Bayesian reasoning (28/8/13)

Machine Learning. Gaussian Mixture Models. Zhiyao Duan & Bryan Pardo, Machine Learning: EECS 349 Fall

CS 361: Probability & Statistics

STA 414/2104: Machine Learning

MLE/MAP + Naïve Bayes

Lecture 11: Probability Distributions and Parameter Estimation

STA414/2104. Lecture 11: Gaussian Processes. Department of Statistics

Parametric Models. Dr. Shuang LIANG. School of Software Engineering TongJi University Fall, 2012

Motivation Scale Mixutres of Normals Finite Gaussian Mixtures Skew-Normal Models. Mixture Models. Econ 690. Purdue University

Fundamentals. CS 281A: Statistical Learning Theory. Yangqing Jia. August, Based on tutorial slides by Lester Mackey and Ariel Kleiner

DEPARTMENT OF COMPUTER SCIENCE Autumn Semester MACHINE LEARNING AND ADAPTIVE INTELLIGENCE

Non-parametric Methods

Recent Advances in Bayesian Inference Techniques

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Density Estimation: ML, MAP, Bayesian estimation

Linear Classification

Discrete Binary Distributions

Lecture 2: Priors and Conjugacy

COMP 551 Applied Machine Learning Lecture 19: Bayesian Inference

Outline. Supervised Learning. Hong Chang. Institute of Computing Technology, Chinese Academy of Sciences. Machine Learning Methods (Fall 2012)

Mark your answers ON THE EXAM ITSELF. If you are not sure of your answer you may wish to provide a brief explanation.

Bayesian Approach 2. CSC412 Probabilistic Learning & Reasoning

CS839: Probabilistic Graphical Models. Lecture 7: Learning Fully Observed BNs. Theo Rekatsinas

Probability. Machine Learning and Pattern Recognition. Chris Williams. School of Informatics, University of Edinburgh. August 2014

Introduction to Machine Learning

Announcements. Proposals graded

NONLINEAR CLASSIFICATION AND REGRESSION. J. Elder CSE 4404/5327 Introduction to Machine Learning and Pattern Recognition

Introduction to Machine Learning. Maximum Likelihood and Bayesian Inference. Lecturers: Eran Halperin, Yishay Mansour, Lior Wolf

Machine Learning. Lecture 4: Regularization and Bayesian Statistics. Feng Li.

Parametric Unsupervised Learning Expectation Maximization (EM) Lecture 20.a

Pattern Recognition. Parameter Estimation of Probability Density Functions

PMR Learning as Inference

COMP90051 Statistical Machine Learning

Machine Learning. Probability Basics. Marc Toussaint University of Stuttgart Summer 2014

CS 361: Probability & Statistics

p L yi z n m x N n xi

Gaussian Processes. Le Song. Machine Learning II: Advanced Topics CSE 8803ML, Spring 2012

CPSC 340: Machine Learning and Data Mining. MLE and MAP Fall 2017

Lecture : Probabilistic Machine Learning

LINEAR MODELS FOR CLASSIFICATION. J. Elder CSE 6390/PSYC 6225 Computational Modeling of Visual Perception

Introduction to Machine Learning. Lecture 2

COMS 4771 Regression. Nakul Verma

CPSC 540: Machine Learning

Probabilistic Graphical Models

Machine Learning

Expectation Propagation Algorithm

CPSC 340: Machine Learning and Data Mining

Probabilistic classification CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2016

Instance-based Learning CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2016

Introduction to machine learning and pattern recognition Lecture 2 Coryn Bailer-Jones

Probability and Estimation. Alan Moses

STA 4273H: Statistical Machine Learning

6.867 Machine Learning

Transcription:

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 2: PROBABILITY DISTRIBUTIONS

Parametric Distributions Basic building blocks: Need to determine given Representation: or? Recall Curve Fitting

Binary Variables (1) Coin flipping: heads=1, tails=0 Bernoulli Distribution

Binary Variables (2) N coin flips: Binomial Distribution

Binomial Distribution

Parameter Estimation (1) ML for Bernoulli Given:

Parameter Estimation (2) Example: Prediction: all future tosses will land heads up Overfitting to D

Beta Distribution Distribution over.

Bayesian Bernoulli The Beta distribution provides the conjugate prior for the Bernoulli distribution.

Beta Distribution

Prior Likelihood = Posterior

Properties of the Posterior As the size of the data set, N, increase

Prediction under the Posterior What is the probability that the next coin toss will land heads up?

Multinomial Variables 1-of-K coding scheme:

ML Parameter estimation Given: Ensure, use a Lagrange multiplier,.

The Multinomial Distribution

The Dirichlet Distribution Conjugate prior for the multinomial distribution.

Bayesian Multinomial (1)

Bayesian Multinomial (2)

The Gaussian Distribution

Central Limit Theorem The distribution of the sum of N i.i.d. random variables becomes increasingly Gaussian as N grows. Example: N uniform [0,1] random variables.

Geometry of the Multivariate Gaussian

Moments of the Multivariate Gaussian (1) thanks to anti-symmetry of z

Moments of the Multivariate Gaussian (2)

Partitioned Gaussian Distributions

Partitioned Conditionals and Marginals

Partitioned Conditionals and Marginals

Bayes Theorem for Gaussian Variables Given we have where

Maximum Likelihood for the Gaussian (1), the log likeli- Given i.i.d. data hood function is given by Sufficient statistics

Maximum Likelihood for the Gaussian (2) Set the derivative of the log likelihood function to zero, and solve to obtain Similarly

Maximum Likelihood for the Gaussian (3) Under the true distribution Hence define

Sequential Estimation Contribution of the N th data point, x N correction given x N correction weight old estimate

The Robbins-Monro Algorithm (1) Consider µ and z governed by p(z,µ) and define the regression function Seek µ? such that f(µ? ) = 0.

The Robbins-Monro Algorithm (2) Assume we are given samples from p(z,µ), one at the time.

The Robbins-Monro Algorithm (3) Successive estimates of µ? are then given by Conditions on a N for convergence :

Robbins-Monro for Maximum Likelihood (1) Regarding as a regression function, finding its root is equivalent to finding the maximum likelihood solution µ ML. Thus

Robbins-Monro for Maximum Likelihood (2) Example: estimate the mean of a Gaussian. The distribution of z is Gaussian with mean ¹ { ¹ ML. For the Robbins-Monro update equation, a N = ¾ 2 =N.

Bayesian Inference for the Gaussian (1) Assume ¾ 2 is known. Given i.i.d. data, the likelihood function for ¹ is given by This has a Gaussian shape as a function of ¹ (but it is not a distribution over ¹).

Bayesian Inference for the Gaussian (2) Combined with a Gaussian prior over ¹, this gives the posterior Completing the square over ¹, we see that

Bayesian Inference for the Gaussian (3) where Note:

Bayesian Inference for the Gaussian (4) Example: for N = 0, 1, 2 and 10.

Bayesian Inference for the Gaussian (5) Sequential Estimation The posterior obtained after observing N { 1 data points becomes the prior when we observe the N th data point.

Bayesian Inference for the Gaussian (6) Now assume ¹ is known. The likelihood function for = 1/¾ 2 is given by This has a Gamma shape as a function of.

Bayesian Inference for the Gaussian (7) The Gamma distribution

Bayesian Inference for the Gaussian (8) Now we combine a Gamma prior,, with the likelihood function for to obtain which we recognize as with

Bayesian Inference for the Gaussian (9) If both ¹ and are unknown, the joint likelihood function is given by We need a prior with the same functional dependence on ¹ and.

Bayesian Inference for the Gaussian (10) The Gaussian-gamma distribution Quadratic in ¹. Linear in. Gamma distribution over. Independent of ¹.

Bayesian Inference for the Gaussian (11) The Gaussian-gamma distribution

Bayesian Inference for the Gaussian (12) Multivariate conjugate priors ¹ unknown, known: p(¹) Gaussian. unknown, ¹ known: p( ) Wishart, and ¹ unknown: p(¹, ) Gaussian- Wishart,

Student s t-distribution where Infinite mixture of Gaussians.

Student s t-distribution

Student s t-distribution Robustness to outliers: Gaussian vs t-distribution.

Student s t-distribution The D-variate case: where. Properties:

Periodic variables Examples: calendar time, direction, We require

von Mises Distribution (1) This requirement is satisfied by where is the 0 th order modified Bessel function of the 1 st kind.

von Mises Distribution (4)

Maximum Likelihood for von Mises Given a data set, is given by, the log likelihood function Maximizing with respect to µ 0 we directly obtain Similarly, maximizing with respect to m we get which can be solved numerically for m ML.

Mixtures of Gaussians (1) Old Faithful data set Single Gaussian Mixture of two Gaussians

Mixtures of Gaussians (2) Combine simple models into a complex model: Component Mixing coefficient K=3

Mixtures of Gaussians (3)

Mixtures of Gaussians (4) Determining parameters ¹,, and ¼ using maximum log likelihood Log of a sum; no closed form maximum. Solution: use standard, iterative, numeric optimization methods or the expectation maximization algorithm (Chapter 9).

The Exponential Family (1) where is the natural parameter and so g( ) can be interpreted as a normalization coefficient.

The Exponential Family (2.1) The Bernoulli Distribution Comparing with the general form we see that and so Logistic sigmoid

The Exponential Family (2.2) The Bernoulli distribution can hence be written as where

The Exponential Family (3.1) The Multinomial Distribution where,, and NOTE: The k parameters are not independent since the corresponding ¹ k must satisfy

The Exponential Family (3.2) Let. This leads to and Here the k parameters are independent. Note that and Softmax

The Exponential Family (3.3) The Multinomial distribution can then be written as where

The Exponential Family (4) The Gaussian Distribution where

ML for the Exponential Family (1) From the definition of g( ) we get Thus

ML for the Exponential Family (2) Give a data set, function is given by, the likelihood Thus we have Sufficient statistic

Conjugate priors For any member of the exponential family, there exists a prior Combining with the likelihood function, we get Prior corresponds to º pseudo-observations with value Â.

Noninformative Priors (1) With little or no information available a-priori, we might choose a non-informative prior. discrete, K-nomial : 2[a,b] real and bounded: real and unbounded: improper! A constant prior may no longer be constant after a change of variable; consider p( ) constant and = 2:

Noninformative Priors (2) Translation invariant priors. Consider For a corresponding prior over ¹, we have for any A and B. Thus p(¹) = p(¹ { c) and p(¹) must be constant.

Noninformative Priors (3) Example: The mean of a Gaussian, ¹ ; the conjugate prior is also a Gaussian, As, this will become constant over ¹.

Noninformative Priors (4) Scale invariant priors. Consider and make the change of variable For a corresponding prior over ¾, we have for any A and B. Thus p(¾) / 1/¾ and so this prior is improper too. Note that this corresponds to p(ln ¾) being constant.

Noninformative Priors (5) Example: For the variance of a Gaussian, ¾ 2, we have If = 1/¾ 2 and p(¾) / 1/¾, then p( ) / 1/. We know that the conjugate distribution for is the Gamma distribution, A noninformative prior is obtained when a 0 = 0 and b 0 = 0.

Nonparametric Methods (1) Parametric distribution models are restricted to specific forms, which may not always be suitable; for example, consider modelling a multimodal distribution with a single, unimodal model. Nonparametric approaches make few assumptions about the overall shape of the distribution being modelled.

Nonparametric Methods (2) Histogram methods partition the data space into distinct bins with widths i and count the number of observations, n i, in each bin. Often, the same width is used for all bins, i =. acts as a smoothing parameter. In a D-dimensional space, using M bins in each dimension will require M D bins!

Nonparametric Methods (3) Assume observations drawn from a density p(x) and consider a small region R containing x such that If the volume of R, V, is sufficiently small, p(x) is approximately constant over R and The probability that K out of N observations lie inside R is Bin(KjN,P ) and if N is large Thus V small, yet K>0, therefore N large?

Nonparametric Methods (4) Kernel Density Estimation: fix V, estimate K from the data. Let R be a hypercube centred on x and define the kernel function (Parzen window) It follows that and hence

Nonparametric Methods (5) To avoid discontinuities in p(x), use a smooth kernel, e.g. a Gaussian Any kernel such that will work. h acts as a smoother.

Nonparametric Methods (6) Nearest Neighbour Density Estimation: fix K, estimate V from the data. Consider a hypersphere centred on x and let it grow to a volume, V?, that includes K of the given N data points. Then K acts as a smoother.

Nonparametric Methods (7) Nonparametric models (not histograms) requires storing and computing with the entire data set. Parametric models, once fitted, are much more efficient in terms of storage and computation.

K-Nearest-Neighbours for Classification (1) Given a data set with N k data points from class C k and, we have and correspondingly Since, Bayes theorem gives

K-Nearest-Neighbours for Classification (2) K = 3 K = 1

K-Nearest-Neighbours for Classification (3) K acts as a smother For, the error rate of the 1-nearest-neighbour classifier is never more than twice the optimal error (obtained from the true conditional class distributions).