Docsity

Probability Densities in Data Mining - Autonomous Robots - Lecture Slides, Slides of Robotics and Autonomous Systems

Partial preview of the text

Download Probability Densities in Data Mining - Autonomous Robots - Lecture Slides and more Slides Robotics and Autonomous Systems in PDF only on Docsity!

1

Slide 1

Probability Densities

in Data Mining

Slide 2

Probability Densities in Data Mining

  • Why we should care
  • Notation and Fundamentals of continuous PDFs
  • Multivariate continuous PDFs
  • Combining continuous and discrete random variables

2

Slide 3

Why we should care

  • Real Numbers occur in at least 50% of database records
  • Can’t always quantize them
  • So need to understand how to describe where they come from
  • A great way of saying what’s a reasonable range of values
  • A great way of saying how multiple attributes should reasonably co-occur

Slide 4

Why we should care

  • Can immediately get us Bayes Classifiers that are sensible with real-valued data
  • You’ll need to intimately understand PDFs in order to do kernel methods, clustering with Mixture Models, analysis of variance, time series and many other things
  • Will introduce us to linear and non-linear regression

4

Slide 7

Properties of PDFs

That means…

h

P x h X x h px

⎟ ⎠ ⎜ ⎞ ⎝

⎛ (^) − < ≤ +

→

( )^22

limh 0

=

< ≤ =

b x a

P a X b p ( x ) dx

∂∂ x P^ (^ X ≤ x )^ = p ( x )

Slide 8

Properties of PDFs

=

< ≤ =

b x a

P a X b p ( x ) dx

∂∂ x P^ (^ X ≤ x )^ = p ( x )

Therefore…

Therefore…

∫ (^ ) =^1

∞ x =−∞

p xdx

∀ x : p ( x )≥ 0

5

Slide 9

Talking to your stomach

  • What’s the gut-feel meaning of p(x)?

If p(5.31) = 0.06 and p(5.92) = 0. then when a value X is sampled from the distribution, you are 2 times as likely to find that X is “very close to” 5.31 than that X is “very close to” 5.92.

Slide 10

Talking to your stomach

  • What’s the gut-feel meaning of p(x)?

If p(5.31) = 0.06 and p(5.92) = 0. then when a value X is sampled from the distribution, you are 2 times as likely to find that X is “very close to” 5.31 than that X is “very close to” 5.92.b

a

a

b

7

Slide 13

Talking to your stomach

  • What’s the gut-feel meaning of p(x)?

If

then when a value X is sampled from the distribution, you are α times as likely to find that X is “very close to” 5.31 than that X is “very close to” 5.92.b

a

p b

p a

Slide 14

Talking to your stomach

  • What’s the gut-feel meaning of p(x)?

If

then

p b

p a

P b h X b h

P a h X a h

h

lim

0

8

Slide 15

Yet another way to view a PDF A recipe for sampling a random age.

  1. Generate a random dot from the rectangle surrounding the PDF curve. Call the dot (age,d)
  2. If d < p(age) stop and return age
  3. Else try again: go to Step 1.

Slide 16

Test your understanding

  • True or False: ∀ x : p ( x )≤ 1

∀ x : P ( X = x )= 0

10

Slide 19

Expectation of a function μ=E[f(X)] = the expected value of f(x) where x is drawn from X’s distribution. = the average value we’d see if we took a very large number of random samples of f(X)

∞ =−∞

= x

μ f ( x ) p ( x ) dx

Note that in general: E [ f ( x )]≠ f ( E [ X ])

E [age 2 ]= 1786. 64 ( E [age])^2 = 1288. 62

Slide 20

Variance σ^2 = Var[X] = the expected squared difference between

x and E[X] ∫

∞ =−∞

= − x

σ^2 ( x μ)^2 p ( x ) dx = amount you’d expect to lose if you must guess an unknown person’s age and you’ll be fined the square of your error, and assuming you play optimally

Var[ age]= 498. 02

11

Slide 21

Standard Deviation σ^2 = Var[X] = the expected squared difference between

x and E[X] ∫

∞ =−∞

= − x

σ^2 ( x μ)^2 p ( x ) dx = amount you’d expect to lose if you must guess an unknown person’s age and you’ll be fined the square of your error, and assuming you play optimally σ = Standard Deviation = “typical” deviation of X from its mean

Var[ age]= 498. 02

σ = Var[ X ]

σ= 22. 32

Slide 22

In 2 dimensions

p(x,y) = probability density of random variables (X,Y) at location (x,y)

13

Slide 25

In 2 dimensions

LetX,Y be a pair of continuous random variables, and let R be some region of (X,Y) space…

∫∫ ∈

xy R

P X Y R p x y dydx ( , )

P( [(mpg-25)/10]^2 + [(weight-3300)/1500] 2 < 1 ) = area under the 2-d surface within the red oval

Slide 26

In 2 dimensions

LetX,Y be a pair of continuous random variables, and let R be some region of (X,Y) space…

∫∫ ∈

xy R

P X Y R p x y dydx ( , )

Take the special case of region R = “everywhere”. Remember that with probability 1, (X,Y) will be drawn from “somewhere”. So..

∫ ∫

∞

=−∞

∞

=−∞

x y

p ( x , y ) dydx 1

14

Slide 27

In 2

dimensions

LetX,Y be a pair of continuous random variables, and let R be some region of (X,Y) space…

∈

xy R

P X Y R p x y dydx ( , )

h 0 2

2 2 2 2

lim h

P x h X x h y h Y y h ⎟ ⎠ ⎜ ⎞ ⎝

⎛ (^) − < ≤ + ∧ − < ≤ +

→

p ( x , y )=

Slide 28

In m

dimensions

Let (X 1 ,X 2 ,…Xm ) be ann-tuple of continuous random variables, and let R be some region of R m^ …

P (( X 1 , X 2 ,..., Xm )∈ R ) =

x x x ∈ R

m m m

p x x x dx dx dx

( , ,..., )

1 2 2 1 1 2

16

Slide 31

Multivariate Expectation

μX = E [ X ]= ∫ x p ( x ) d x

E[mpg,weight] = (24.5,2600)

The centroid of the cloud

Slide 32

Multivariate Expectation

E [ f ( X )]= ∫ f ( x ) p ( x ) d x

17

Slide 33

Test your understanding Question :When(ifever)does E [ X + Y ]= E [ X ]+ E [ Y ]?

•All the time? •Only when X and Y are independent? •It can fail even if X and Y are independent?

Slide 34

Bivariate Expectation

if f ( x , y )= x then E [ f ( X , Y )]= ∫ xp ( x , y ) dydx

E [ f ( x , y )]= (^) ∫ f ( x , y ) p ( x , y ) dydx

if f ( x , y )= y then E [ f ( X , Y )]= ∫ yp ( x , y ) dydx

if f ( x , y )= x + y then E [ f ( X , Y )]= ∫ ( x + y ) p ( x , y ) dydx

E [ X + Y ]= E [ X ]+ E [ Y ]

19

Slide 37

Covariance Intuition

E[mpg,weight] = (24.5,2600)

σmpg = 8 σmpg = 8

σweight = 700

σweight = 700

Slide 38

Covariance Intuition

E[mpg,weight] = (24.5,2600)

σmpg = 8 σmpg = 8

σweight = 700

σweight = 700

Principal Eigenvector of Σ

20

Slide 39

Covariance Fun Facts

xy y

T x xy E ( x )( x) 2

2 [ ] [ ] σ σ

σ σ Cov X X μ X μ Σ

•True or False: If σxy = 0 then X and Y are independent •True or False: If X and Y are independent then σxy = 0 •True or False: If σxy = σx σy then X and Y are deterministically related •True or False: If X and Y are deterministically related then σxy = σx σy

How could you prove or disprove these?

Slide 40

General Covariance

Cov [ X ] = E [ ( X − μ x )( X − μ x)T ] = Σ

Let X = (X 1 ,X 2 , … X (^) k ) be a vector ofk continuous random variables

Σ ij = Cov [ Xi , Xj ]= σ xi x j

S is a k x k symmetric non-negative definite matrix If all distributions are linearly independent it is positive definite If the distributions are linearly dependent it has determinant zero