Subject | Hash | Author | Date (UTC) |
---|---|---|---|
whitebox: add Gaussian Z_min whitebox | e989c87895d681920056558a0b9473b93c3b299b | I am | 2022-01-04 13:54:37 |
schemes: přídat pár komentářů k schematům | e8f1665d43cfb70e89716f591852538df0e27d8c | I am | 2022-01-04 09:00:36 |
mplot.maxes: tri_nodes_plot is almost ready. Zbyvá to udělat hezky | 251a0f4b7909a5468453cfb518c2bbb4064cce51 | I am | 2022-01-04 06:42:36 |
mplot.maxes: add complete tri plots | 08c6e421188c4251cae1aa664a69bdc3a0afb314 | I am | 2022-01-04 05:45:21 |
mplot.mart: add tri_plot() function | aace2f9d02b7744651a089c164af9b7b5824729e | I am | 2022-01-04 05:44:14 |
simplex: fix use before initialization | ff8be3dcc679c4893948d7d1dc6c45402ccee81b | I am | 2022-01-04 05:43:17 |
mplot.maxes: prepare convex_hull_plot() function | 732f16a441c1a5f1160b45d91a050683ee70ff5d | I am | 2022-01-03 15:26:59 |
mplot.mart: comment out old convex plot function, prepare qhull_plot instead | 59de205056903adf87f84c5c1b022c3c83fa9c57 | I am | 2022-01-03 15:24:30 |
mplot.mgraph: prepare orth graph routines | 74e30ed99fcc6e68c6b3bf7e55bbd93fe8f26d13 | I am | 2022-01-02 11:18:11 |
convex_hull: complicate orth estimator | ba5f40eaf0f5f4012ef07f5684d58481cefbfe09 | I am | 2021-12-28 13:56:19 |
reader: explicitly use utf-8 encoding. (Nemělo by to nic pokazit.. Pitomé nastavení ve Windows) | 17bc8a9692695c22f78f8a39ed8aaddd4bfa4808 | I am | 2021-12-26 22:59:41 |
dicebox: walk throw candidates in reversed order | cadf89d0efc973d540b4ee6b337eb175ae962ee8 | I am | 2021-12-24 21:03:00 |
schemes: exclude walkington 5 and 7 (2D and 3D schemes) from offer in higher dimensions | 4d7b7e249c18c41f9220c778ada21116cca02aa0 | I am | 2021-12-23 23:52:07 |
simplex: implement fallback integration | 9a1048540d803a76cba8c92ca67efc16c932f1a9 | I am | 2021-12-23 22:36:38 |
schemes: oprava komentaře | bfa1fd1f1e1fe2e86838ee2f63f43fab50d0d115 | I am | 2021-12-22 13:40:45 |
schemes: send degree parameter as is to quadpy. | a1758193a21bf47031e376612418c26c1eb1d289 | I am | 2021-12-22 11:53:30 |
qt_gui: allow zero degree for cubature schemes | ed4cf50cdbf382999ef9e161dbec0e97ed508739 | I am | 2021-12-22 11:52:03 |
simplex: teď budeme hlídát aby vysledek integrace nebyl záporný | 173727edac0fb6611aaa2da2ed0d200a7377a2a4 | I am | 2021-12-22 08:31:01 |
dicebox: comment out our favorite print debug | 2963588b1d47a8c35a0c3ae8c611427ecbb3a843 | I am | 2021-12-22 08:30:16 |
mplot.mart: use fancy arrows instead of triangle markers | ac42eaf4b8e12037720601d2335d44ae0b057feb | I am | 2021-12-22 04:32:06 |
File | Lines added | Lines deleted |
---|---|---|
whitebox.py | 33 | 0 |
File whitebox.py changed (mode: 100644) (index 1f864d2..1a28174) | |||
... | ... | from scipy import stats | |
24 | 24 | from scipy import special # for S_ball | from scipy import special # for S_ball |
25 | 25 | from scipy import integrate # for S_ball | from scipy import integrate # for S_ball |
26 | 26 | ||
27 | import mpmath # for Gaussian_Z_min | ||
28 | |||
29 | mpmath.mp.dps = 325 # to cover anything that double-presigion float can handle | ||
30 | |||
27 | 31 | from .samplebox import SampleBox | from .samplebox import SampleBox |
28 | 32 | ||
29 | 33 | from . import f_models | from . import f_models |
... | ... | class Lognormal_Z_prod(WhiteBox): #č ověřím to moje odvození... | |
331 | 335 | return 'Lognormal_Z_prod(nvar=%s, %s, %s)' % (wt.f.nvar, wt.beta_exact, wt.sign) | return 'Lognormal_Z_prod(nvar=%s, %s, %s)' % (wt.f.nvar, wt.beta_exact, wt.sign) |
332 | 336 | ||
333 | 337 | ||
338 | class Gaussian_Z_min(WhiteBox): | ||
339 | def __init__(self, ndim=2, **kwargs): | ||
340 | "je třeba zadat buď pf_exact, nebo konštantu u funkce minima Z_min" | ||
341 | |||
342 | self.f = f_models.SNorm(ndim) | ||
343 | self.ndim = ndim | ||
344 | |||
345 | |||
346 | self.pf_exact_method = 'exact solution' | ||
347 | if 'pf_exact' in kwargs: | ||
348 | self.pf_exact = kwargs['pf_exact'] | ||
349 | sf = 1 - mpmath.root(1 - mpmath.mpf(self.pf_exact), ndim) | ||
350 | self.const = stats.norm.isf(float(sf)) | ||
351 | elif 'const' in kwargs: | ||
352 | self.const = kwargs['const'] | ||
353 | self.pf_exact = float(1 - mpmath.ncdf(self.const)**ndim) | ||
354 | else: | ||
355 | raise ValueError | ||
356 | self.gm = g_models.Z_min(self.const) # min(X1, X2, XN) + const | ||
357 | # na začatku nemáme vzorky - pouze rozdělení a podpís | ||
358 | self.sample_box = SampleBox(self.f(), gm_signature=self.gm_signature) | ||
359 | |||
360 | def __str__(self): | ||
361 | return 'Gaussian_Z_min%sD'%(self.ndim) | ||
362 | |||
363 | def __repr__(self): | ||
364 | return 'Gaussian_Z_min(%s, pf_exact=%s)' % (repr(self.ndim), repr(self.pf_exact)) | ||
365 | |||
366 | |||
334 | 367 | class Weibull_Z_min(WhiteBox): | class Weibull_Z_min(WhiteBox): |
335 | 368 | def __init__(self, wb_scales=(1.,1.), shape=5, **kwargs): | def __init__(self, wb_scales=(1.,1.), shape=5, **kwargs): |
336 | 369 | """ | """ |