CS181 Lecture 21: Instance-Based Methods and Histograms in Machine Learning, Study notes of Artificial Intelligence

Instance-based methods, specifically histograms, in machine learning. The concept of histograms in two-dimensional boxes, dividing boxes into bins, counting proportions of training instances, and estimating probabilities. The document also explores the use of histograms in classification, k-nearest neighbors, and kernel functions such as hypercube and gaussian. The curse of dimensionality is addressed as a caveat.

Typology: Study notes

2010/2011

Uploaded on 10/25/2011

thecoral
thecoral 🇺🇸

4.5

(30)

395 documents

1 / 26

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS181 Lecture 21:
Instance-Based Methods
David C. Parkes
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download CS181 Lecture 21: Instance-Based Methods and Histograms in Machine Learning and more Study notes Artificial Intelligence in PDF only on Docsity!

CS181 Lecture 21:

Instance-Based Methods

David C. Parkes

Histograms

  • Consider M=2 dimensional box

Histograms

  • Count proportion of training instances in each bin
  • Estimate P ( x ) = N k

/ N £ V

k where Nx = number of instances in k and N = total number of instances and point x in bin k and V k is volume bin N k

/ N = 3/

x V k

P ( x ) = 2

Histograms: Classification

• Choose most common class in bin

x

k - Nearest Neighbors “Density Estimator”

  • Given an instance x
  • Find k points with smallest L 1 distance (max distance in any one direction).
  • Set cube side length h = 2d max (d max is furthest distance of k points) x k = 3 h = 2/ N = 6 V = 4/ P ( x ) = k /( NV h

Effect of k

30 points

Alternative View

  • Consider a hypercube with length h=1/ x

N

B

h = 1/ V h

N = 6

P ( x ) = N B

/ (N V

h

Alternative View

  • Consider a hypercube with length h=1/ x

N

B

h = 1/ V h

N = 6

P ( x ) = N B

/ (N V

h

Alternative View

  • Consider a hypercube with length h=1/ x

N

B

h = 1/ V h

N = 6

P ( x ) = N B

/ (N V

h

Gaussian Kernel Example

x

K

1

K

2 Estimate P ( x ) = (1/2) * ( K 1

+ K

2

Alternate View

x Estimate P ( x ) = (1/2) * ( K 1

+ K

2

K

2

Gaussian Kernel:

Bimodal Density Function

Don’t get confused – a Gaussian kernel density estimator does not assume the data is Gaussian! x