-
X-Received: by 10.157.20.6 with SMTP id h6mr822919oth.18.1475862021034; Fri, 07 Oct
2016 10:40:21 -0700 (PDT)
X-Received: by 10.157.20.6 with SMTP id h6mr822919oth.18.1475862021034; Fri, 07 Oct
2016 10:40:21 -0700 (PDT)
Path: news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit
0.net!news.glorb.com!Xbb.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.
giganews.com!o19no971465ito.0!news-out.google.com!w143ni2892itb.0!nntp.google.c
om!l13no966579itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-
for-mail
Newsgroups: pl.comp.programming
Date: Fri, 7 Oct 2016 10:40:20 -0700 (PDT)
In-Reply-To: <3...@g...com>
Complaints-To: g...@g...com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.254.35.87;
posting-account=xjvq9QoAAAATMPC2X3btlHd_LkaJo_rj
NNTP-Posting-Host: 77.254.35.87
References: <7...@g...com>
<nt6oi5$1q7$1@node1.news.atman.pl>
<b...@g...com>
<nt6pts$339$1@node1.news.atman.pl>
<f...@g...com>
<nt8691$ihf$1@node1.news.atman.pl>
<3...@g...com>
<1...@g...com>
<0...@g...com>
<b...@g...com>
<9...@g...com>
<3...@g...com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0...@g...com>
Subject: Re: testowanie generatorów liczb losowych (kontynuacja)
From: "M.M." <m...@g...com>
Injection-Date: Fri, 07 Oct 2016 17:40:21 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
Lines: 126
Xref: news-archive.icm.edu.pl pl.comp.programming:209896
[ ukryj nagłówki ]On Friday, October 7, 2016 at 6:02:59 PM UTC+2, bartekltg wrote:
> Nie. Podałem Ci kontrprzykład.
> Ciagów bardzo nielosowych, które dają znacznie lepsze oszacowania MC.
Ok, nie ciągnijmy, bo za dużo obwarowań. Generalnie wiadomo, że ciąg
doskonale równomierny może dać lepsze oszacowanie całki niż ciąg
naprawdę losowy - nie o to chciałem się kłócić.
Popatrzmy lepiej na wpływ parametru k w dieharder.
Upewnijmy się, że mamy ciągle ten sam seed i ten sam ciąg liczb
pseudo losowych:
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 1 -k 1
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 7.99e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 100|0.92170613| PASSED | 1234
real 0m1.822s
user 0m1.817s
sys 0m0.004s
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 1 -k 0
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 8.08e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 100|0.92170613| PASSED | 1234
real 0m1.817s
user 0m1.808s
sys 0m0.008s
Wynik ten sam z dokładnością do 8 miejsc po przecinku, więc ciąg ten sam.
Zwiększamy m=100 (10tys testów)
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 100 -k 0
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 8.40e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 10000|0.01512520| PASSED | 1234
real 3m0.888s
user 3m0.475s
sys 0m0.436s
x@x:~$
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 100 -k 0
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 8.44e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 10000|0.01512520| PASSED | 1234
real 3m6.036s
user 3m5.858s
sys 0m0.104s
Znowu wynik ten sam, więc możemy być pewni że ciąg ten sam.
Zmieniam k=1
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 100 -k 1
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 8.36e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 10000|0.01514407| PASSED | 1234
real 3m2.390s
user 3m2.357s
sys 0m0.052s
Widać malą różnicę w wyniku.
Dajemy k=2
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 100 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 8.43e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 10000|0.01514407| PASSED | 1234
real 3m5.804s
user 3m5.475s
sys 0m0.315s
Wynik taki sam jak dla k=1
Teraz k=3
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 100 -k 3
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 6.64e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 10000|0.00283496| WEAK | 1234
real 3m16.142s
user 3m15.666s
sys 0m0.336s
Upssss wynik zupełnie inny.
teraz k=4
x@x:~$ time dieharder -s 1 -S 1234 -d 0 -g 15 -m 100 -k 4
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#===================================================
==========================#
rng_name |rands/second|
mt19937_1998| 8.05e+07 |
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment| Seed
#===================================================
==========================#
diehard_birthdays| 0| 100| 10000|0.00283496| WEAK | 1234
real 3m12.022s
user 3m11.777s
sys 0m0.137s
To samo co dla k=3
Różnic w czasie wykonania dużych nie ma. Mój wniosek: testy mogą być
liczone na precyzji jaką oferuje sprzętowo procesor, ale wzorek na
chi-kwadrat powinien być liczony na bignumie. Jeśli wersja szybka
pada już dla m=100, to wersja dokładna pewnie też padnie dla większych
wartości m.
Pozdrawiam
Następne wpisy z tego wątku
- 07.10.16 19:58 bartekltg
- 08.10.16 00:25 M.M.
- 08.10.16 02:32 M.M.
- 08.10.16 09:52 bartekltg
- 08.10.16 14:00 M.M.
Najnowsze wątki z tej grupy
- 7. Raport Totaliztyczny: Sprawa Qt Group wer. 424
- TCL - problem z escape ostatniego \ w nawiasach {}
- Nauka i Praca Programisty C++ w III Rzeczy (pospolitej)
- testy-wyd-sort - Podsumowanie
- Tworzenie Programów Nieuprzywilejowanych Opartych Na Wtyczkach
- Do czego nadaje się QDockWidget z bibl. Qt?
- Bibl. Qt jest sztucznie ograniczona - jest nieprzydatna do celów komercyjnych
- Co sciaga kretynow
- AEiC 2024 - Ada-Europe conference - Deadlines Approaching
- Jakie są dobre zasady programowania programów opartych na wtyczkach?
- sprawdzanie słów kluczowych dot. zła
- Re: W czym sie teraz pisze programy??
- Re: (PDF) Surgical Pathology of Non-neoplastic Gastrointestinal Diseases by Lizhi Zhang
- CfC 28th Ada-Europe Int. Conf. Reliable Software Technologies
- Młodzi programiści i tajna policja
Najnowsze wątki
- 2024-12-15 (ino)wrocław
- 2024-12-15 Obcinaczki z łapaczem
- 2024-12-14 światła znów wlączyli
- 2024-12-14 nie lekceważ termostatu
- 2024-12-14 numer 112
- 2024-12-14 Pendrive, ale dysk
- 2024-12-12 Autocom CAN CDP+ wysokie kody błędów
- 2024-12-13 termostat do lodowki
- 2024-12-13 Gdańsk => Inżynier bezpieczeństwa aplikacji <=
- 2024-12-13 Warszawa => Head of International Freight Forwarding Department <=
- 2024-12-13 Poznań => Employer Branding Specialist <=
- 2024-12-13 Kraków => Business Development Manager - Dział Sieci i Bezpieczeńst
- 2024-12-13 Kraków => Business Development Manager - Network and Network Security
- 2024-12-13 Katowice => Regionalny Kierownik Sprzedaży (OZE) <=
- 2024-12-13 Gdańsk => Programista Full Stack .Net <=