Example of MC sampling - University of Florida

Download Report

Transcript Example of MC sampling - University of Florida

Space-Filling DOEs
• These designs use values of variables
inside range instead of at boundaries
• Latin hypercubes, one popular spacefilling DOE uses as many levels as design
points
• Space-filling term is appropriate for low
dimensional spaces
• For high-dimensional spaces, we cannot
afford to “fill” the space.
Monte Carlo sampling
• Sampling at random points.
• Given a region in design space, we can assign a
uniform distribution to the region and sample points
to generate DOE
• It is likely, though, that some regions will be poorly
sampled
• In 5-dimensional space, with 32 sample points, what
is the chance that all orthants will be occupied?
– (31/32)(30/32)…(1/32)=1.8e-13.
Example of MC sampling
1
3
0.8
2
0.6
0.4
1
0.2
0
0
0.5
1
0
0
0.5
1
6
x=rand(20,2);
subplot(2,2,1); plot(x(:,1),
x(:,2), 'o');
subplot(2,2,2); hist(x(:,2));
subplot(2,2,3); hist(x(:,1));
4
2
0
0
0.5
1
Latin Hypercube sampling
• Each variable range divided into ny equal
probability intervals. One point at each interval.
1
2
2
3
3
4
4
1
5
5
Latin Hypercube definition
matrix
• For n points with m variables: m by n matrix, with
each column a permutation of 1,…,n
• Examples
1 2 4 
1 3
2 1


 3 2 
4 1 2


3 3 3


2 4 1
• Points are better distributed for each variable,
but can still have holes in m-dimensional space.
Matlab lhsdesign
x=lhsdesign(10,2);
plot(x(:,1), x(:,2), 'o');
xr=lhsdesign(10,2,'criterion','correlation');
hold on
1
0.9
plot(x(:,1), x(:,2), 'r+');
0.8
r=corrcoef(x)
0.7
r = 1.0000 0.7746
0.6
0.7746 1.0000
0.5
r=corrcoef(xr)
0.4
r = 1.0000 0.0303
0.3
0.0303 1.0000
0.2
0.1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
More iterations
x=lhsdesign(10,2,'iterations',5000);
plot(x(:,1), x(:,2), 'o'); hold on
xr=lhsdesign(10,2,'criterion','correlation','iterations',5000);
1
plot(xr(:,1), xr(:,2), 'r+');
0.9
>> r=corrcoef(x)
0.8
r =1.0000 -0.4510
0.7
-0.4510 1.0000
0.6
>> r=corrcoef(xr)
0.5
r =1.0000 -0.0424
0.4
-0.0424 1.0000
0.3
0.2
0.1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Recall MC sampling
1
3
0.8
2
0.6
0.4
1
0.2
0
0
0.5
1
0
0
0.5
1
6
x=rand(20,2);
subplot(2,2,1); plot(x(:,1),
x(:,2), 'o');
subplot(2,2,2); hist(x(:,2));
subplot(2,2,3); hist(x(:,1));
4
2
0
0
0.5
1
Distribution of single variables
with LHS
1
2
0.8
1.5
0.6
1
0.4
0.5
0.2
0
0
0.5
1
0
0
0.5
1
2
1.5
1
0.5
0
0
0.5
1
x=lhsdesign(20,2,'iteration',5000
,'criterion','correlation')
subplot(2,2,1); plot(x(:,1), x(:,2),
'o');
subplot(2,2,2); hist(x(:,2));
subplot(2,2,3); hist(x(:,1));
Empty space
Goel, T., Haftka, R.T., Shyy, W., and Watson, L.T., (2008), “Pitfalls of using a single criterion for
selecting experimental designs,” International Journal for Numerical Methods in Engineering, 75:
127 – 155.
Instead of maximizing minimum distance it seems that it would be better to
minimize the volume of the largest void. Why don’t we do that?
Figure 2. Illustration of the largest spherical empty space inside the three-dimensional
design space (20 points): (a) D-optimal design and (b) LHS design.
Mixed designs
• D-optimal designs may leave much space
inside.
• LHS designs may leave out the boundary and
lead to large extrapolation errors.
• It may be desirable to combine the two.
• In low dimensional spaces you can add the
vertices to LHS designs.
• In higher dimensional spaces you can generate
a larger LHS design and choose a D-optimal
subset.