Why does my quasi-random numbers, generated with the HALTONSET, not fill each of the dimensions?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 25 Mai 2010
Modifié(e) : MathWorks Support Team
le 29 Jan 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.
Réponse acceptée
MathWorks Support Team
le 18 Oct 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!