Basic Sampling Methods
Machine Learning
Srihari
Basic Sampling Methods
Sargur Srihari srihari@cedar.buffalo.edu
1
Machine Learning
Srihari
Topics
1. Motivation 2. Sampling from PGMs 3. Transforming a Uniform Distribution 4. Rejection Sampling 5. Importance Sampling 6. Sampling-Importance-Resampling
2
Machine Learning
Srihari
1. Motivation
? Inference is the task of determining a response to a query from a given model
? When exact inference is intractable, we need some form of approximation
? Inference methods based on numerical sampling are known as Monte Carlo techniques
? Most situations will require evaluating expectations of unobserved variables, e.g., to make predictions
3
Machine Learning
Srihari
Using samples for inference
? Obtain set of samples z(l) where i =1,.., L
? Drawn independently from distribution p(z)
? Allows expectation E[f ] = f(z)p(z)dz to be approximated by
f^ = 1 L f (z(l))
L i=1
Called an estimator
? Then E[f^] = E[f ], i.e., estimator has the correct mean
? And
var[
f^]
=
1 L
E "#(
f
-
E(
f
))2
$ %
which is the variance of the estimator
? Accuracy independent of dimensionality of z
? High accuracy can be achieved with few (10 or 20 samples)
? However samples may not be independent
? Effective sample size may be smaller than apparent sample size ? In example f(z) is small when p(z) is high and vice versa
? Expectation may be dominated by regions of small probability thereby requiring large
sample sizes
4
Machine Learning
Srihari
2. Sampling from directed PGMs
? If joint distribution is represented by a BN
? no observed variables
? straightforward method is ancestral sampling
?
Distribution
is
specified
by
p(z) =
M
p(zi
| pai )
i =1
? where zi are set of variables associated with node i and
? pai are set of variables associated with node parents of node i
? To obtain samples from joint
? we make one pass through set of variables in order z1,..zM sampling from conditional distribution p(z|pai)
? After one pass through the graph we obtain one sample
? Frequency of different values defines the distribution
? E.g., allowing us to determine marginals
P(L,S) = P(D,I,G,L,S)= P(D)P(I )P(G | D,I )P(L |G)P(S | I )
D,I ,G
D,I ,G
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- sampling methods for online surveys
- sampling procedure ncsu
- part 1 basic principles chapter 2 sampling methods
- chapter 10 respondents and sampling
- simple random sampling and systematic sampling
- examples of sampling methods
- exercise 6 selection of simple random sampling using
- basic sampling methods
- writing chapter 3 chapter 3 methodology
- mixed methods sampling a typology with examples
Related searches
- statistical sampling calculator
- statistical sampling plan calculator
- sampling distribution proportion calculator
- mean of sampling distribution calculator
- standard deviation of sampling distribution calculator
- statistical sampling methods pdf
- examples of statistical sampling technique
- sampling design pdf
- types of sampling methods
- sampling techniques pdf
- what is a sampling design
- sampling techniques in research pdf