Why does my quasi-random numbers, generated with the HALTONSET, not fill each of the dimensions?
4 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2010-5-25
编辑: MathWorks Support Team
2015-1-29
I am generating some quasi-random numbers using the HALTONSET class. However, the points returned are not always uniformly distributed over each of the dimensions.
For example, the following code generates quasi-random points that should fill the 30 dimensional unit hypercube:
p = haltonset(30,'Skip',1e7,'Leap',1e2);
X = net(p,1000);
figure, boxplot(X)
However, you can see that values for dimension 26 are not evenly distributed over the unit interval.
采纳的回答
MathWorks Support Team
2013-10-18
This change has been incorporated into the documentation in Release 2010a (R2010a). For previous releases, read below for any additional information:
Many Leap values create sequences that fail to touch on large sub-hyper-rectangles of the unit hypercube, and so fail to be a uniform quasi-random point set.
A known rule for choosing Leap values for Halton sets is to set it to (P-1) where P is a prime number that has not been used to generate one of the dimensions, i.e. for a k-dimensional point set P would be the (k+1)th or greater prime.
So in this 30 dimensional example, a suitable Leap value would be the 31st prime - 1, i.e., 127-1 = 126:
p = haltonset(30,'Skip',1e7,'Leap',126);
X = net(p,1000);
boxplot(X)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!