_distr_params.py 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. """
  2. Sane parameters for stats.distributions.
  3. """
  4. import numpy as np
  5. distcont = [
  6. ['alpha', (3.5704770516650459,)],
  7. ['anglit', ()],
  8. ['arcsine', ()],
  9. ['argus', (1.0,)],
  10. ['beta', (2.3098496451481823, 0.62687954300963677)],
  11. ['betaprime', (5, 6)],
  12. ['bradford', (0.29891359763170633,)],
  13. ['burr', (10.5, 4.3)],
  14. ['burr12', (10, 4)],
  15. ['cauchy', ()],
  16. ['chi', (78,)],
  17. ['chi2', (55,)],
  18. ['cosine', ()],
  19. ['crystalball', (2.0, 3.0)],
  20. ['dgamma', (1.1023326088288166,)],
  21. ['dpareto_lognorm', (3, 1.2, 1.5, 2)],
  22. ['dweibull', (2.0685080649914673,)],
  23. ['erlang', (10,)],
  24. ['expon', ()],
  25. ['exponnorm', (1.5,)],
  26. ['exponpow', (2.697119160358469,)],
  27. ['exponweib', (2.8923945291034436, 1.9505288745913174)],
  28. ['f', (29, 18)],
  29. ['fatiguelife', (29,)], # correction numargs = 1
  30. ['fisk', (3.0857548622253179,)],
  31. ['foldcauchy', (4.7164673455831894,)],
  32. ['foldnorm', (1.9521253373555869,)],
  33. ['gamma', (1.9932305483800778,)],
  34. ['gausshyper', (13.763771604130699, 3.1189636648681431,
  35. 2.5145980350183019, 5.1811649903971615)], # veryslow
  36. ['genexpon', (9.1325976465418908, 16.231956600590632, 3.2819552690843983)],
  37. ['genextreme', (-0.1,)],
  38. ['gengamma', (4.4162385429431925, 3.1193091679242761)],
  39. ['gengamma', (4.4162385429431925, -3.1193091679242761)],
  40. ['genhalflogistic', (0.77274727809929322,)],
  41. ['genhyperbolic', (0.5, 1.5, -0.5,)],
  42. ['geninvgauss', (2.3, 1.5)],
  43. ['genlogistic', (0.41192440799679475,)],
  44. ['gennorm', (1.2988442399460265,)],
  45. ['halfgennorm', (0.6748054997000371,)],
  46. ['genpareto', (0.1,)], # use case with finite moments
  47. ['gibrat', ()],
  48. ['gompertz', (0.94743713075105251,)],
  49. ['gumbel_l', ()],
  50. ['gumbel_r', ()],
  51. ['halfcauchy', ()],
  52. ['halflogistic', ()],
  53. ['halfnorm', ()],
  54. ['hypsecant', ()],
  55. ['invgamma', (4.0668996136993067,)],
  56. ['invgauss', (0.14546264555347513,)],
  57. ['invweibull', (10.58,)],
  58. ['irwinhall', (10,)],
  59. ['jf_skew_t', (8, 4)],
  60. ['johnsonsb', (4.3172675099141058, 3.1837781130785063)],
  61. ['johnsonsu', (2.554395574161155, 2.2482281679651965)],
  62. ['kappa4', (0.0, 0.0)],
  63. ['kappa4', (-0.1, 0.1)],
  64. ['kappa4', (0.0, 0.1)],
  65. ['kappa4', (0.1, 0.0)],
  66. ['kappa3', (1.0,)],
  67. ['ksone', (1000,)], # replace 22 by 100 to avoid failing range, ticket 956
  68. ['kstwo', (10,)],
  69. ['kstwobign', ()],
  70. ['landau', ()],
  71. ['laplace', ()],
  72. ['laplace_asymmetric', (2,)],
  73. ['levy', ()],
  74. ['levy_l', ()],
  75. ['levy_stable', (1.8, -0.5)],
  76. ['loggamma', (0.41411931826052117,)],
  77. ['logistic', ()],
  78. ['loglaplace', (3.2505926592051435,)],
  79. ['lognorm', (0.95368226960575331,)],
  80. ['loguniform', (0.01, 1.25)],
  81. ['lomax', (1.8771398388773268,)],
  82. ['maxwell', ()],
  83. ['mielke', (10.4, 4.6)],
  84. ['moyal', ()],
  85. ['nakagami', (4.9673794866666237,)],
  86. ['ncf', (27, 27, 0.41578441799226107)],
  87. ['nct', (14, 0.24045031331198066)],
  88. ['ncx2', (21, 1.0560465975116415)],
  89. ['norm', ()],
  90. ['norminvgauss', (1.25, 0.5)],
  91. ['pareto', (2.621716532144454,)],
  92. ['pearson3', (0.1,)],
  93. ['pearson3', (-2,)],
  94. ['powerlaw', (1.6591133289905851,)],
  95. ['powerlaw', (0.6591133289905851,)],
  96. ['powerlognorm', (2.1413923530064087, 0.44639540782048337)],
  97. ['powernorm', (4.4453652254590779,)],
  98. ['rayleigh', ()],
  99. ['rdist', (1.6,)],
  100. ['recipinvgauss', (0.63004267809369119,)],
  101. ['reciprocal', (0.01, 1.25)],
  102. ['rel_breitwigner', (36.545206797050334, )],
  103. ['rice', (0.7749725210111873,)],
  104. ['semicircular', ()],
  105. ['skewcauchy', (0.5,)],
  106. ['skewnorm', (4.0,)],
  107. ['studentized_range', (3.0, 10.0)],
  108. ['t', (2.7433514990818093,)],
  109. ['trapezoid', (0.2, 0.8)],
  110. ['triang', (0.15785029824528218,)],
  111. ['truncexpon', (4.6907725456810478,)],
  112. ['truncnorm', (-1.0978730080013919, 2.7306754109031979)],
  113. ['truncnorm', (0.1, 2.)],
  114. ['truncpareto', (1.8, 5.3)],
  115. ['truncpareto', (2, 5)],
  116. ['truncpareto', (-2, 5)],
  117. ['truncweibull_min', (2.5, 0.25, 1.75)],
  118. ['tukeylambda', (3.1321477856738267,)],
  119. ['uniform', ()],
  120. ['vonmises', (3.9939042581071398,)],
  121. ['vonmises_line', (3.9939042581071398,)],
  122. ['wald', ()],
  123. ['weibull_max', (2.8687961709100187,)],
  124. ['weibull_min', (1.7866166930421596,)],
  125. ['wrapcauchy', (0.031071279018614728,)]
  126. ]
  127. distdiscrete = [
  128. ['bernoulli',(0.3,)],
  129. ['betabinom', (5, 2.3, 0.63)],
  130. ['betanbinom', (5, 9.3, 1)],
  131. ['binom', (5, 0.4)],
  132. ['boltzmann',(1.4, 19)],
  133. ['dlaplace', (0.8,)], # 0.5
  134. ['geom', (0.5,)],
  135. ['hypergeom',(30, 12, 6)],
  136. ['hypergeom',(21,3,12)], # numpy.random (3,18,12) numpy ticket:921
  137. ['hypergeom',(21,18,11)], # numpy.random (18,3,11) numpy ticket:921
  138. ['nchypergeom_fisher', (140, 80, 60, 0.5)],
  139. ['nchypergeom_wallenius', (140, 80, 60, 0.5)],
  140. ['logser', (0.6,)], # re-enabled, numpy ticket:921
  141. ['nbinom', (0.4, 0.4)], # from tickets: 583
  142. ['nbinom', (5, 0.5)],
  143. ['planck', (0.51,)], # 4.1
  144. ['poisson', (0.6,)],
  145. ['poisson_binom', ([0.1, 0.6, 0.7, 0.8],)],
  146. ['randint', (7, 31)],
  147. ['skellam', (15, 8)],
  148. ['zipf', (6.6,)],
  149. ['zipfian', (0.75, 15)],
  150. ['zipfian', (1.25, 10)],
  151. ['yulesimon', (11.0,)],
  152. ['nhypergeom', (20, 7, 1)]
  153. ]
  154. invdistdiscrete = [
  155. # In each of the following, at least one shape parameter is invalid
  156. ['hypergeom', (3, 3, 4)],
  157. ['nhypergeom', (5, 2, 8)],
  158. ['nchypergeom_fisher', (3, 3, 4, 1)],
  159. ['nchypergeom_wallenius', (3, 3, 4, 1)],
  160. ['bernoulli', (1.5, )],
  161. ['binom', (10, 1.5)],
  162. ['betabinom', (10, -0.4, -0.5)],
  163. ['betanbinom', (10, -0.4, -0.5)],
  164. ['boltzmann', (-1, 4)],
  165. ['dlaplace', (-0.5, )],
  166. ['geom', (1.5, )],
  167. ['logser', (1.5, )],
  168. ['nbinom', (10, 1.5)],
  169. ['planck', (-0.5, )],
  170. ['poisson', (-0.5, )],
  171. ['poisson_binom', ([-1, 2, 0.5],)],
  172. ['randint', (5, 2)],
  173. ['skellam', (-5, -2)],
  174. ['zipf', (-2, )],
  175. ['yulesimon', (-2, )],
  176. ['zipfian', (-0.75, 15)]
  177. ]
  178. invdistcont = [
  179. # In each of the following, at least one shape parameter is invalid
  180. ['alpha', (-1, )],
  181. ['anglit', ()],
  182. ['arcsine', ()],
  183. ['argus', (-1, )],
  184. ['beta', (-2, 2)],
  185. ['betaprime', (-2, 2)],
  186. ['bradford', (-1, )],
  187. ['burr', (-1, 1)],
  188. ['burr12', (-1, 1)],
  189. ['cauchy', ()],
  190. ['chi', (-1, )],
  191. ['chi2', (-1, )],
  192. ['cosine', ()],
  193. ['crystalball', (-1, 2)],
  194. ['dgamma', (-1, )],
  195. ['dpareto_lognorm', (3, -1.2, 1.5, 2)],
  196. ['dweibull', (-1, )],
  197. ['erlang', (-1, )],
  198. ['expon', ()],
  199. ['exponnorm', (-1, )],
  200. ['exponweib', (1, -1)],
  201. ['exponpow', (-1, )],
  202. ['f', (10, -10)],
  203. ['fatiguelife', (-1, )],
  204. ['fisk', (-1, )],
  205. ['foldcauchy', (-1, )],
  206. ['foldnorm', (-1, )],
  207. ['genlogistic', (-1, )],
  208. ['gennorm', (-1, )],
  209. ['genpareto', (np.inf, )],
  210. ['genexpon', (1, 2, -3)],
  211. ['genextreme', (np.inf, )],
  212. ['genhyperbolic', (0.5, -0.5, -1.5,)],
  213. ['gausshyper', (1, 2, 3, -4)],
  214. ['gamma', (-1, )],
  215. ['gengamma', (-1, 0)],
  216. ['genhalflogistic', (-1, )],
  217. ['geninvgauss', (1, 0)],
  218. ['gibrat', ()],
  219. ['gompertz', (-1, )],
  220. ['gumbel_r', ()],
  221. ['gumbel_l', ()],
  222. ['halfcauchy', ()],
  223. ['halflogistic', ()],
  224. ['halfnorm', ()],
  225. ['halfgennorm', (-1, )],
  226. ['hypsecant', ()],
  227. ['invgamma', (-1, )],
  228. ['invgauss', (-1, )],
  229. ['invweibull', (-1, )],
  230. ['irwinhall', (-1,)],
  231. ['irwinhall', (0,)],
  232. ['irwinhall', (2.5,)],
  233. ['jf_skew_t', (-1, 0)],
  234. ['johnsonsb', (1, -2)],
  235. ['johnsonsu', (1, -2)],
  236. ['kappa4', (np.nan, 0)],
  237. ['kappa3', (-1, )],
  238. ['ksone', (-1, )],
  239. ['kstwo', (-1, )],
  240. ['kstwobign', ()],
  241. ['landau', ()],
  242. ['laplace', ()],
  243. ['laplace_asymmetric', (-1, )],
  244. ['levy', ()],
  245. ['levy_l', ()],
  246. ['levy_stable', (-1, 1)],
  247. ['logistic', ()],
  248. ['loggamma', (-1, )],
  249. ['loglaplace', (-1, )],
  250. ['lognorm', (-1, )],
  251. ['loguniform', (10, 5)],
  252. ['lomax', (-1, )],
  253. ['maxwell', ()],
  254. ['mielke', (1, -2)],
  255. ['moyal', ()],
  256. ['nakagami', (-1, )],
  257. ['ncx2', (-1, 2)],
  258. ['ncf', (10, 20, -1)],
  259. ['nct', (-1, 2)],
  260. ['norm', ()],
  261. ['norminvgauss', (5, -10)],
  262. ['pareto', (-1, )],
  263. ['pearson3', (np.nan, )],
  264. ['powerlaw', (-1, )],
  265. ['powerlognorm', (1, -2)],
  266. ['powernorm', (-1, )],
  267. ['rdist', (-1, )],
  268. ['rayleigh', ()],
  269. ['rice', (-1, )],
  270. ['recipinvgauss', (-1, )],
  271. ['semicircular', ()],
  272. ['skewnorm', (np.inf, )],
  273. ['studentized_range', (-1, 1)],
  274. ['rel_breitwigner', (-2, )],
  275. ['t', (-1, )],
  276. ['trapezoid', (0, 2)],
  277. ['triang', (2, )],
  278. ['truncexpon', (-1, )],
  279. ['truncnorm', (10, 5)],
  280. ['truncpareto', (-1, -5)],
  281. ['truncpareto', (1.8, .5)],
  282. ['truncweibull_min', (-2.5, 0.25, 1.75)],
  283. ['tukeylambda', (np.nan, )],
  284. ['uniform', ()],
  285. ['vonmises', (-1, )],
  286. ['vonmises_line', (-1, )],
  287. ['wald', ()],
  288. ['weibull_min', (-1, )],
  289. ['weibull_max', (-1, )],
  290. ['wrapcauchy', (2, )],
  291. ['reciprocal', (15, 10)],
  292. ['skewcauchy', (2, )]
  293. ]