Why does my quasi-random numbers, generated with the HALTONSET, not fill each of the dimensions?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 25 Mag 2010
Modificato: MathWorks Support Team
il 29 Gen 2015
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.
Risposta accettata
MathWorks Support Team
il 18 Ott 2013
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!