repeated sampling from sobol (or halton) sequence

10 ビュー (過去 30 日間)
Chet Sharma
Chet Sharma 2022 年 8 月 18 日
コメント済み: Bharath Attoti 2022 年 12 月 13 日
Hello
Very new to the idea of Quasi RN sampling. Starting point:
If I had to sample 20 times from the standard normal (5 random numbers at a time), I would just do this:
for i = 1: 20
x = randn(1, 1:5)
end
How would I do the same from a halton or sobol sequence?
I've been looking at the documentation.....not clear yet. I'm sure its staring at me....just a little help would be awesome!!
  2 件のコメント
Chet Sharma
Chet Sharma 2022 年 8 月 18 日
Still searching....I tried the following code. What I'm not able to understand is how to change the result of the test2 variable....how do I make it change for each iteration? The code here doesn't quite do it....
for i = 1 : 10
test = haltonset(1000, 'skip', i);
test = scramble(test, 'RR2');
test2 = net(test, 5);
end
Bharath Attoti
Bharath Attoti 2022 年 12 月 13 日
Yes, I am not sure why but even a change in rng seed value does not seem to change the output point set of sobolset and haltonset. I remember getting diffirent results with change in seed in the 2017b version of Matlab. I have upgraded to version 2022b now. Is it the issue with the latest version? Which version are you using?

サインインしてコメントする。

回答 (1 件)

Chet Sharma
Chet Sharma 2022 年 8 月 18 日
Looks like the answer may be much simpler:
x1 = RandStream('mt19937ar')
x1 =
mt19937ar random stream Seed: 0 NormalTransform: Ziggurat
x2 = randn(x1, 4, 1)
x2 = 4×1
0.5377 1.8339 -2.2588 0.8622

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by