-
Data: 2016-10-07 02:58:28
Temat: Re: testowanie generatorów liczb losowych (kontynuacja)
Od: bartekltg <b...@g...com> szukaj wiadomości tego autora
[ pokaż wszystkie nagłówki ]On 06.10.2016 22:42, M.M. wrote:
> Trudno uwierzyć, ale widać czarno na białym, że mt19937_1998
> wg diehardera nie przechodzi testu birthdays. dieharder ma
> problem, MT, ja coś źle robię?
>
>
>
> time dieharder -d 0 -g 15 -m 1000
> #===================================================
==========================#
> # dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
> #===================================================
==========================#
> rng_name |rands/second| Seed |
> mt19937_1998| 1.12e+07 | 502159522|
> #===================================================
==========================#
> test_name |ntup| tsamples |psamples| p-value |Assessment
> #===================================================
==========================#
> diehard_birthdays| 0| 100| 100000|0.00000458| WEAK
>
> real 31m42.178s
> user 31m31.855s
> sys 0m6.840s
>
>
>
> time dieharder -d 0 -g 15 -m 5000
> #===================================================
==========================#
> # dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
> #===================================================
==========================#
> rng_name |rands/second| Seed |
> mt19937_1998| 4.32e+06 |2158334279|
> #===================================================
==========================#
> test_name |ntup| tsamples |psamples| p-value |Assessment
> #===================================================
==========================#
> diehard_birthdays| 0| 100| 100000|0.00000000| FAILED
>
> real 39m10.705s
> user 39m3.746s
> sys 0m4.479s
>
Jedna sptawa, to ta flaga:
-k ks_flag - ks_flag
0 is fast but slightly sloppy for psamples > 4999 (default).
//A Ty yżywasz p=100 000
...
2 is very slow and accurate to machine precision.
...
Druga opcja, którą mozęsz się zainteresować to testowanie do upadłego,
zwłąszczą uwagami. To nie musi być problem generatora, ale może być i
testu, bo niekoniecznie są one numerycznie stabilne z wystarczającą
dokłądnośćią, a nieraz i ich teoretyczny rozkład jest dla wersji
asymptotycznej (hmm, w sumie wtedy może zwiększenie -t ).
-Y Xtrategy - the Xtrategy flag controls the new 'test to failure' (T2F)
modes. These flags and their modes act as follows:
...
2 - 'test to destruction' (T2D) mode. Sometimes you just want to know
where or if a generator will .I ever fail a test (or test series).
-Y 2
causes psamples to be added 100 at a time until a test returns an
overall pvalue lower than the failure threshold or a specified maximum
number of psamples (see -P) is reached.
Note well! In this mode one may well fail due to the alternate
null hypothesis -- the test itself is a bad test and fails! Many
dieharder tests, despite our best efforts, are numerically unstable or
have only approximately known target statistics or are straight up
asymptotic results, and will eventually return a failing result
even for
a gold-standard generator (such as AES), or for the hypercautious the
XOR generator with AES, threefish, kiss, all loaded at once and xor'd
together. It is therefore safest to use this mode comparatively,
executing a T2D run on AES to get an idea of the test failure
threshold(s) (something I will eventually do and publish on the web so
everybody doesn't have to do it independently) and then running it on
your target generator. Failure with numbers of psamples within an
order
of magnitude of the AES thresholds should probably be considered
possible test failures, not generator failures. Failures at levels
significantly less than the known gold standard generator failure
thresholds are, of course, probably failures of the generator.
This option should only be used with -k 2.
MT nie jest też generatorem idealnym.
W dokumentacji, chyba nie ma online, jest w paczce w
.../dieharder-3.31.1/manual/ jako TeX (trzeba skompilować)
Jest tam rozdział o bracei tego generatora
7.0.1 A Good Generator: mt19937 1999
I po nastu stronach wyników jest omówienie. Czego nie przechodzi,
co przechodzi. I ejst tam też to:
We then begin on the Diehard tests. The test passes the birthday test,
but examining
the distribution produced we can see that the pass is a bit "marginal",
in the sense that
p isn't terribly uniformly distributed. When this happens, one may want
to rerun the
particular test a few times to see if the features in the histogram vary
or are systematic.
Alternatively, rerunning it with a larger value of KS samples with e.g.
-p 1000 or more
may push it into unambiguous failure and in fact it does. This is a
marginal result,
and a sample of random numbers far smaller than what would be used in
any numerical
simulation will unambiguously fail the Diehard birthdays test.
Zawalenie _już_ przy -p 1000 jest przewidywane (choć ten tekst jak i
cała ksiazeczka jest niewiele zmieniana od wielu wersji, może coś
poprawili w kodzie).
O co chodzi w ostatneim, wydaje się najważniejszym, zdaniu,
nie mam pojęćia.
Dokręciły się testy:
time dieharder -d 0 -g 15 -m 1000
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
mt19937_1998| 1.68e+07 |2613656395|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00006613| WEAK
real 22m53.588s
user 22m48.928s
sys 0m0.884s
time dieharder -d 0 -g 15 -m 1000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
mt19937_1998| 1.71e+07 |3645920823|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00000002| FAILED
real 39m30.472s
user 39m14.048s
sys 0m5.244s
time dieharder -d 0 -g 15 -m 5000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
mt19937_1998| 6.62e+06 |2144839991|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00000012| FAILED
real 42m33.697s
user 42m25.048s
sys 0m4.516s
Za poradą z pdfa, ten sam test, twardszy generator,
chyba jednak to już wina testu/implementacji
time dieharder -d 0 -g 205 -m 1000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
AES_OFB| 5.17e+06 |3983713961|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00003436| WEAK
real 34m53.133s
user 34m47.464s
sys 0m4.556s
time dieharder -d 0 -g 205 -m 5000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
AES_OFB| 1.98e+06 | 373043125|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00000176| WEAK
real 56m56.810s
user 56m31.972s
sys 0m22.432s
pzdr
bartekltg
Następne wpisy z tego wątku
- 07.10.16 03:18 M.M.
- 07.10.16 15:00 Borneq
- 07.10.16 15:20 M.M.
- 07.10.16 16:39 bartekltg
- 07.10.16 16:47 bartekltg
- 07.10.16 16:51 M.M.
- 07.10.16 17:00 bartekltg
- 07.10.16 17:20 bartekltg
- 07.10.16 17:21 M.M.
- 07.10.16 17:23 Borneq
- 07.10.16 18:02 bartekltg
- 07.10.16 19:40 M.M.
- 07.10.16 19:58 bartekltg
- 08.10.16 00:25 M.M.
- 08.10.16 02:32 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-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 <=
- 2024-12-13 Warszawa => Analityk Biznesowo-Systemowy <=
- 2024-12-13 Białystok => Architekt rozwiązań (doświadczenie w obszarze Java, A