_distr_params.py 8.3 KB

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