pypdevsbbl.extra.rngstreams.distributions.html 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>pypdevsbbl.extra.rngstreams.distributions module &#8212; Python(P)DEVS-BBL documentation</title>
  8. <link rel="stylesheet" href="_static/nature.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  10. <link rel="stylesheet" type="text/css" href="_static/custom.css" />
  11. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  12. <script type="text/javascript" src="_static/jquery.js"></script>
  13. <script type="text/javascript" src="_static/underscore.js"></script>
  14. <script type="text/javascript" src="_static/doctools.js"></script>
  15. <script type="text/javascript" src="_static/language_data.js"></script>
  16. <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  17. <link rel="index" title="Index" href="genindex.html" />
  18. <link rel="search" title="Search" href="search.html" />
  19. <link rel="next" title="pypdevsbbl.extra.equations module" href="pypdevsbbl.extra.equations.html" />
  20. <link rel="prev" title="pypdevsbbl.extra.rngstreams package" href="pypdevsbbl.extra.rngstreams.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="pypdevsbbl.extra.equations.html" title="pypdevsbbl.extra.equations module"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="pypdevsbbl.extra.rngstreams.html" title="pypdevsbbl.extra.rngstreams package"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  39. <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" >pypdevsbbl.extra package</a> &#187;</li>
  40. <li class="nav-item nav-item-3"><a href="pypdevsbbl.extra.rngstreams.html" accesskey="U">pypdevsbbl.extra.rngstreams package</a> &#187;</li>
  41. </ul>
  42. </div>
  43. <div class="document">
  44. <div class="documentwrapper">
  45. <div class="bodywrapper">
  46. <div class="body" role="main">
  47. <div class="section" id="module-pypdevsbbl.extra.rngstreams.distributions">
  48. <span id="pypdevsbbl-extra-rngstreams-distributions-module"></span><h1>pypdevsbbl.extra.rngstreams.distributions module<a class="headerlink" href="#module-pypdevsbbl.extra.rngstreams.distributions" title="Permalink to this headline">¶</a></h1>
  49. <p>RNGs do not necessary only apply on the interval (0, 1).</p>
  50. <p>For this reason, this file also allows numerous different
  51. distributions from which we can obtain random streams.
  52. Based on the simple proof of:</p>
  53. <div class="math notranslate nohighlight">
  54. \[Pr[X &lt;= x] = Pr[F^{-1}(U) &lt;= x] = Pr[U &lt;= F(x)] = F(x)\]</div>
  55. <p>we know that all we need is an inverse cumulative distribution
  56. function for all distributions we like to offer.</p>
  57. <p>In this module, there are multiple inverse cumulative distribution functions implemented
  58. in such a way that you can use any RNG in the range (0, 1) for generating the data. It
  59. is therefore completely standalone from some builtin implementation for a RNG.</p>
  60. <p>Besides Wikipedia, I refer to the following link when it comes to the actual distributions:
  61. <a class="reference external" href="http://www2.isikun.edu.tr/mustafahekimoglu/simulation/Lecture5-ProbabilityReview.pdf">http://www2.isikun.edu.tr/mustafahekimoglu/simulation/Lecture5-ProbabilityReview.pdf</a></p>
  62. <p>Also, all functions return numpy-classes!</p>
  63. <dl class="function">
  64. <dt id="pypdevsbbl.extra.rngstreams.distributions.beta">
  65. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">beta</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#beta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.beta" title="Permalink to this definition">¶</a></dt>
  66. <dd><p>Inverse of the beta cdf on the interval [0, 1] with shapes a1 and a2.</p>
  67. <table class="docutils field-list" frame="void" rules="none">
  68. <col class="field-name" />
  69. <col class="field-body" />
  70. <tbody valign="top">
  71. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  72. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  73. <li><strong>a</strong> (<em>numeric</em>) – The first shape parameter.</li>
  74. <li><strong>b</strong> (<em>numeric</em>) – The second shape parameter.</li>
  75. </ul>
  76. </td>
  77. </tr>
  78. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  79. </td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </dd></dl>
  84. <dl class="function">
  85. <dt id="pypdevsbbl.extra.rngstreams.distributions.binomial">
  86. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">binomial</code><span class="sig-paren">(</span><em>y</em>, <em>n</em>, <em>p</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#binomial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.binomial" title="Permalink to this definition">¶</a></dt>
  87. <dd><p>Inverse of the discrete binomial cdf with n experiments that have p chance of success.</p>
  88. <p>Since a Bernoulli distribution is a special case of the binomial distribution,
  89. you can also use this function for those usecases.</p>
  90. <div class="math notranslate nohighlight">
  91. \[Bernouilli(y, p) = binomial(y, 1, p)\]</div>
  92. <table class="docutils field-list" frame="void" rules="none">
  93. <col class="field-name" />
  94. <col class="field-body" />
  95. <tbody valign="top">
  96. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  97. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  98. <li><strong>n</strong> (<em>numeric</em>) – The number of experiments.</li>
  99. <li><strong>p</strong> (<em>numeric</em>) – The chance for success in an experiment.</li>
  100. </ul>
  101. </td>
  102. </tr>
  103. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  104. </td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. </dd></dl>
  109. <dl class="function">
  110. <dt id="pypdevsbbl.extra.rngstreams.distributions.cauchy">
  111. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">cauchy</code><span class="sig-paren">(</span><em>y</em>, <em>x0=0</em>, <em>scale=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#cauchy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.cauchy" title="Permalink to this definition">¶</a></dt>
  112. <dd><p>The inverse of the cauchy cdf.</p>
  113. <p>This distribution is also known as the Lorentz distribution or the
  114. Breit-Wigner distribution. It is often used as the canonical example
  115. of a pathological distribution.</p>
  116. <table class="docutils field-list" frame="void" rules="none">
  117. <col class="field-name" />
  118. <col class="field-body" />
  119. <tbody valign="top">
  120. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  121. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  122. <li><strong>x0</strong> (<em>numeric</em>) – The location of the distribution. Defaults to 0.</li>
  123. <li><strong>scale</strong> (<em>numeric</em>) – The scale of the distribution. Defaults to 1.</li>
  124. </ul>
  125. </td>
  126. </tr>
  127. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  128. </td>
  129. </tr>
  130. </tbody>
  131. </table>
  132. </dd></dl>
  133. <dl class="function">
  134. <dt id="pypdevsbbl.extra.rngstreams.distributions.chiSquare">
  135. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">chiSquare</code><span class="sig-paren">(</span><em>y</em>, <em>k</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#chiSquare"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.chiSquare" title="Permalink to this definition">¶</a></dt>
  136. <dd><p>Inverse of the chi square cdf with k degrees of freedom.</p>
  137. <p>This distribution is a special case of the gamma distribution and occurs
  138. the most often in inferential statistics.</p>
  139. <dl class="docutils">
  140. <dt>Technically, this is a special case of the gamma distribution where:</dt>
  141. <dd>shape = k / 2
  142. rate = 1</dd>
  143. </dl>
  144. <table class="docutils field-list" frame="void" rules="none">
  145. <col class="field-name" />
  146. <col class="field-body" />
  147. <tbody valign="top">
  148. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  149. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  150. <li><strong>k</strong> (<em>numeric</em>) – The degrees of freedom to use.</li>
  151. </ul>
  152. </td>
  153. </tr>
  154. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  155. </td>
  156. </tr>
  157. </tbody>
  158. </table>
  159. </dd></dl>
  160. <dl class="function">
  161. <dt id="pypdevsbbl.extra.rngstreams.distributions.exponential">
  162. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">exponential</code><span class="sig-paren">(</span><em>y</em>, <em>l</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#exponential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.exponential" title="Permalink to this definition">¶</a></dt>
  163. <dd><p>The inverse of the exponential cdf.</p>
  164. <p>This distribution is often used to predict the wait time until the
  165. first event.
  166. The mean of this distribution is 1/l.</p>
  167. <p>The exponential function is “memoryless”. In other words:
  168. Pr[X &gt; s+t | X &gt; s] = Pr[X &gt; t]</p>
  169. <table class="docutils field-list" frame="void" rules="none">
  170. <col class="field-name" />
  171. <col class="field-body" />
  172. <tbody valign="top">
  173. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  174. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  175. <li><strong>l</strong> (<em>numeric</em>) – The rate parameter (lambda),
  176. i.e. mean number of occurrences per time unit.</li>
  177. </ul>
  178. </td>
  179. </tr>
  180. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  181. </td>
  182. </tr>
  183. </tbody>
  184. </table>
  185. </dd></dl>
  186. <dl class="function">
  187. <dt id="pypdevsbbl.extra.rngstreams.distributions.F">
  188. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">F</code><span class="sig-paren">(</span><em>y</em>, <em>d1</em>, <em>d2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#F"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.F" title="Permalink to this definition">¶</a></dt>
  189. <dd><p>Inverse of the Fisher-Snedecor cdf with d1 and d2 its degrees of freedom.</p>
  190. <table class="docutils field-list" frame="void" rules="none">
  191. <col class="field-name" />
  192. <col class="field-body" />
  193. <tbody valign="top">
  194. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  195. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  196. <li><strong>d1</strong> (<em>numeric</em>) – The degrees of freedom to use.</li>
  197. <li><strong>d2</strong> (<em>numeric</em>) – The degrees of freedom to use.</li>
  198. </ul>
  199. </td>
  200. </tr>
  201. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  202. </td>
  203. </tr>
  204. </tbody>
  205. </table>
  206. </dd></dl>
  207. <dl class="function">
  208. <dt id="pypdevsbbl.extra.rngstreams.distributions.frechet">
  209. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">frechet</code><span class="sig-paren">(</span><em>y</em>, <em>alpha</em>, <em>m=0</em>, <em>s=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#frechet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.frechet" title="Permalink to this definition">¶</a></dt>
  210. <dd><p>The inverse of the Fréchet cdf.</p>
  211. <p>This distribution is also known as the Generalized Extreme Value Type B
  212. distribution or the log-Weibull distribution. It is commonly used in
  213. hydrology.</p>
  214. <table class="docutils field-list" frame="void" rules="none">
  215. <col class="field-name" />
  216. <col class="field-body" />
  217. <tbody valign="top">
  218. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  219. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  220. <li><strong>alpha</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  221. <li><strong>m</strong> (<em>numeric</em>) – The location of the distribution. Defaults to 0.</li>
  222. <li><strong>s</strong> (<em>numeric</em>) – The scale of the distribution. Defaults to 1.</li>
  223. </ul>
  224. </td>
  225. </tr>
  226. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  227. </td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. </dd></dl>
  232. <dl class="function">
  233. <dt id="pypdevsbbl.extra.rngstreams.distributions.gamma">
  234. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">gamma</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.gamma" title="Permalink to this definition">¶</a></dt>
  235. <dd><p>Inverse of the gamma cdf with shape a and rate b.</p>
  236. <p>This distribution is used to predict the wait time until the a-th event.</p>
  237. <p>This formula is based upon the shape-rate system, so if you want to use
  238. the shape-scale system, use the property tao = 1/b</p>
  239. <p>Seeing as the erlang distribution is a special case of the gamma
  240. distribution (i.e. b is an integer), you can also use this function
  241. for those purposes.</p>
  242. <p>This function makes use of the _gamma_cache dictionary for efficiency.</p>
  243. <table class="docutils field-list" frame="void" rules="none">
  244. <col class="field-name" />
  245. <col class="field-body" />
  246. <tbody valign="top">
  247. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  248. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  249. <li><strong>a</strong> (<em>numeric</em>) – The shape of the curve.</li>
  250. <li><strong>b</strong> (<em>numeric</em>) – The rate parameter.</li>
  251. </ul>
  252. </td>
  253. </tr>
  254. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  255. </td>
  256. </tr>
  257. </tbody>
  258. </table>
  259. </dd></dl>
  260. <dl class="function">
  261. <dt id="pypdevsbbl.extra.rngstreams.distributions.geometric">
  262. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">geometric</code><span class="sig-paren">(</span><em>y</em>, <em>p</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#geometric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.geometric" title="Permalink to this definition">¶</a></dt>
  263. <dd><p>Inverse of the discrete geometric cdf with p chance for success.</p>
  264. <p><span class="math notranslate nohighlight">\(x\)</span> would represent the amount of faillures.</p>
  265. <table class="docutils field-list" frame="void" rules="none">
  266. <col class="field-name" />
  267. <col class="field-body" />
  268. <tbody valign="top">
  269. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  270. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  271. <li><strong>p</strong> (<em>numeric</em>) – The chance for success in an experiment.</li>
  272. </ul>
  273. </td>
  274. </tr>
  275. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  276. </td>
  277. </tr>
  278. </tbody>
  279. </table>
  280. </dd></dl>
  281. <dl class="function">
  282. <dt id="pypdevsbbl.extra.rngstreams.distributions.gumbel">
  283. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">gumbel</code><span class="sig-paren">(</span><em>y</em>, <em>mu=0</em>, <em>beta=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#gumbel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.gumbel" title="Permalink to this definition">¶</a></dt>
  284. <dd><p>The inverse of the Gumbel cdf.</p>
  285. <p>This distribution is also known as the Generalized Extreme Value Type A
  286. distribution or the log-Weibull distribution. It is commonly used in
  287. hydrology.</p>
  288. <table class="docutils field-list" frame="void" rules="none">
  289. <col class="field-name" />
  290. <col class="field-body" />
  291. <tbody valign="top">
  292. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  293. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  294. <li><strong>mu</strong> (<em>numeric</em>) – The location of the distribution. Defaults to 0.</li>
  295. <li><strong>beta</strong> (<em>numeric</em>) – The scale of the distribution. Defaults to 1.</li>
  296. </ul>
  297. </td>
  298. </tr>
  299. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  300. </td>
  301. </tr>
  302. </tbody>
  303. </table>
  304. </dd></dl>
  305. <dl class="function">
  306. <dt id="pypdevsbbl.extra.rngstreams.distributions.JSB">
  307. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">JSB</code><span class="sig-paren">(</span><em>y</em>, <em>a1</em>, <em>a2</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#JSB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.JSB" title="Permalink to this definition">¶</a></dt>
  308. <dd><p>Inverse of the Johnson Bounded cdf.</p>
  309. <table class="docutils field-list" frame="void" rules="none">
  310. <col class="field-name" />
  311. <col class="field-body" />
  312. <tbody valign="top">
  313. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  314. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  315. <li><strong>a1</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  316. <li><strong>a2</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  317. <li><strong>a</strong> (<em>numeric</em>) – The location of the distribution.</li>
  318. <li><strong>b</strong> (<em>numeric</em>) – The scale of the distribution.</li>
  319. </ul>
  320. </td>
  321. </tr>
  322. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  323. </td>
  324. </tr>
  325. </tbody>
  326. </table>
  327. </dd></dl>
  328. <dl class="function">
  329. <dt id="pypdevsbbl.extra.rngstreams.distributions.johnsonB">
  330. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">johnsonB</code><span class="sig-paren">(</span><em>y</em>, <em>a1</em>, <em>a2</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.johnsonB" title="Permalink to this definition">¶</a></dt>
  331. <dd><p>Alias for <a class="reference internal" href="#pypdevsbbl.extra.rngstreams.distributions.JSB" title="pypdevsbbl.extra.rngstreams.distributions.JSB"><code class="xref py py-meth docutils literal notranslate"><span class="pre">JSB()</span></code></a> for readability.</p>
  332. </dd></dl>
  333. <dl class="function">
  334. <dt id="pypdevsbbl.extra.rngstreams.distributions.JSU">
  335. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">JSU</code><span class="sig-paren">(</span><em>y</em>, <em>a1</em>, <em>a2</em>, <em>g</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#JSU"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.JSU" title="Permalink to this definition">¶</a></dt>
  336. <dd><p>Inverse of the Johnson Unbounded cdf.</p>
  337. <table class="docutils field-list" frame="void" rules="none">
  338. <col class="field-name" />
  339. <col class="field-body" />
  340. <tbody valign="top">
  341. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  342. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  343. <li><strong>a1</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  344. <li><strong>a2</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  345. <li><strong>g</strong> (<em>numeric</em>) – The location of the distribution.</li>
  346. <li><strong>b</strong> (<em>numeric</em>) – The scale of the distribution.</li>
  347. </ul>
  348. </td>
  349. </tr>
  350. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  351. </td>
  352. </tr>
  353. </tbody>
  354. </table>
  355. </dd></dl>
  356. <dl class="function">
  357. <dt id="pypdevsbbl.extra.rngstreams.distributions.johnsonU">
  358. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">johnsonU</code><span class="sig-paren">(</span><em>y</em>, <em>a1</em>, <em>a2</em>, <em>g</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.johnsonU" title="Permalink to this definition">¶</a></dt>
  359. <dd><p>Alias for <a class="reference internal" href="#pypdevsbbl.extra.rngstreams.distributions.JSU" title="pypdevsbbl.extra.rngstreams.distributions.JSU"><code class="xref py py-meth docutils literal notranslate"><span class="pre">JSU()</span></code></a> for readability.</p>
  360. </dd></dl>
  361. <dl class="function">
  362. <dt id="pypdevsbbl.extra.rngstreams.distributions.laplace">
  363. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">laplace</code><span class="sig-paren">(</span><em>y</em>, <em>mu=0</em>, <em>b=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#laplace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.laplace" title="Permalink to this definition">¶</a></dt>
  364. <dd><p>Inverse of the Laplace cdf.</p>
  365. <p>The distribution is used in speech recognition and hydrology.</p>
  366. <table class="docutils field-list" frame="void" rules="none">
  367. <col class="field-name" />
  368. <col class="field-body" />
  369. <tbody valign="top">
  370. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  371. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  372. <li><strong>mu</strong> (<em>numeric</em>) – The location of the distribution. Defaults to 0.</li>
  373. <li><strong>b</strong> (<em>numeric</em>) – The scale of the distribution. Defaults to 1.</li>
  374. </ul>
  375. </td>
  376. </tr>
  377. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  378. </td>
  379. </tr>
  380. </tbody>
  381. </table>
  382. </dd></dl>
  383. <dl class="function">
  384. <dt id="pypdevsbbl.extra.rngstreams.distributions.logistic">
  385. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">logistic</code><span class="sig-paren">(</span><em>y</em>, <em>mu=0</em>, <em>s=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#logistic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.logistic" title="Permalink to this definition">¶</a></dt>
  386. <dd><p>Inverse of the Logistic cdf.</p>
  387. <p>Also known as the Sech-squared distribution. It appears in logistic
  388. regression and feedforward neural networks.</p>
  389. <table class="docutils field-list" frame="void" rules="none">
  390. <col class="field-name" />
  391. <col class="field-body" />
  392. <tbody valign="top">
  393. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  394. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  395. <li><strong>mu</strong> (<em>numeric</em>) – The location of the distribution. Defaults to 0.</li>
  396. <li><strong>s</strong> (<em>numeric</em>) – The scale of the distribution. Defaults to 1.</li>
  397. </ul>
  398. </td>
  399. </tr>
  400. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  401. </td>
  402. </tr>
  403. </tbody>
  404. </table>
  405. </dd></dl>
  406. <dl class="function">
  407. <dt id="pypdevsbbl.extra.rngstreams.distributions.loglogistic">
  408. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">loglogistic</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#loglogistic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.loglogistic" title="Permalink to this definition">¶</a></dt>
  409. <dd><p>Inverse of the Log-Logistic / Fisk cdf.</p>
  410. <p>In economics, this distribution is known as the Fisk distribution.</p>
  411. <table class="docutils field-list" frame="void" rules="none">
  412. <col class="field-name" />
  413. <col class="field-body" />
  414. <tbody valign="top">
  415. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  416. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  417. <li><strong>a</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  418. <li><strong>b</strong> (<em>numeric</em>) – The scale of the distribution.</li>
  419. </ul>
  420. </td>
  421. </tr>
  422. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  423. </td>
  424. </tr>
  425. </tbody>
  426. </table>
  427. </dd></dl>
  428. <dl class="function">
  429. <dt id="pypdevsbbl.extra.rngstreams.distributions.lognormal">
  430. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">lognormal</code><span class="sig-paren">(</span><em>y</em>, <em>mu</em>, <em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#lognormal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.lognormal" title="Permalink to this definition">¶</a></dt>
  431. <dd><p>Inverse of the log-normal cdf with mean mu and standard derivation s.</p>
  432. <p>Generates a variable whose natural logarithm is normally distributed with
  433. mean mu and standard derivation s.</p>
  434. <table class="docutils field-list" frame="void" rules="none">
  435. <col class="field-name" />
  436. <col class="field-body" />
  437. <tbody valign="top">
  438. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  439. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  440. <li><strong>mu</strong> (<em>numeric</em>) – The mean of the distribution.</li>
  441. <li><strong>s</strong> (<em>numeric</em>) – The standard derivation of the distribution.</li>
  442. </ul>
  443. </td>
  444. </tr>
  445. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  446. </td>
  447. </tr>
  448. </tbody>
  449. </table>
  450. </dd></dl>
  451. <dl class="function">
  452. <dt id="pypdevsbbl.extra.rngstreams.distributions.negbinomial">
  453. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">negbinomial</code><span class="sig-paren">(</span><em>y</em>, <em>r</em>, <em>p</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#negbinomial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.negbinomial" title="Permalink to this definition">¶</a></dt>
  454. <dd><p>Inverse of the discrete negative binomial cdf with p chance of success foreach of s dist.</p>
  455. <table class="docutils field-list" frame="void" rules="none">
  456. <col class="field-name" />
  457. <col class="field-body" />
  458. <tbody valign="top">
  459. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  460. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  461. <li><strong>r</strong> (<em>numeric</em>) – The number of faillures.</li>
  462. <li><strong>p</strong> (<em>numeric</em>) – The chance for success in an experiment.</li>
  463. </ul>
  464. </td>
  465. </tr>
  466. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  467. </td>
  468. </tr>
  469. </tbody>
  470. </table>
  471. </dd></dl>
  472. <dl class="function">
  473. <dt id="pypdevsbbl.extra.rngstreams.distributions.normal">
  474. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">normal</code><span class="sig-paren">(</span><em>y</em>, <em>mu=0</em>, <em>s=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#normal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.normal" title="Permalink to this definition">¶</a></dt>
  475. <dd><p>Inverse of the normal cdf with mean mu and standard derivation s.</p>
  476. <p>The implementation of this function is based on the quantile function
  477. and the properties of the errorfunction erf.</p>
  478. <table class="docutils field-list" frame="void" rules="none">
  479. <col class="field-name" />
  480. <col class="field-body" />
  481. <tbody valign="top">
  482. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  483. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  484. <li><strong>mu</strong> (<em>numeric</em>) – The mean of the distribution.
  485. Defaults to 0.</li>
  486. <li><strong>s</strong> (<em>numeric</em>) – The standard derivation of the distribution.
  487. Defaults to 1.</li>
  488. </ul>
  489. </td>
  490. </tr>
  491. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  492. </td>
  493. </tr>
  494. </tbody>
  495. </table>
  496. </dd></dl>
  497. <dl class="function">
  498. <dt id="pypdevsbbl.extra.rngstreams.distributions.pareto">
  499. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">pareto</code><span class="sig-paren">(</span><em>y</em>, <em>alpha</em>, <em>xm</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#pareto"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.pareto" title="Permalink to this definition">¶</a></dt>
  500. <dd><p>Inverse of the Pareto cdf.</p>
  501. <p>The distribution is used to describe social, scientifical, geophysical,
  502. actuatial… phenomena. It originally was used to describe the distribution
  503. of wealth.</p>
  504. <p>Colloquially, the distribution is refered to as the <cite>80-20 rule</cite>.</p>
  505. <table class="docutils field-list" frame="void" rules="none">
  506. <col class="field-name" />
  507. <col class="field-body" />
  508. <tbody valign="top">
  509. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  510. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  511. <li><strong>alpha</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  512. <li><strong>xm</strong> (<em>numeric</em>) – The scale of the distribution. Defaults to 1.</li>
  513. </ul>
  514. </td>
  515. </tr>
  516. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  517. </td>
  518. </tr>
  519. </tbody>
  520. </table>
  521. </dd></dl>
  522. <dl class="function">
  523. <dt id="pypdevsbbl.extra.rngstreams.distributions.poisson">
  524. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">poisson</code><span class="sig-paren">(</span><em>y</em>, <em>l</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#poisson"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.poisson" title="Permalink to this definition">¶</a></dt>
  525. <dd><p>Inverse of the discrete Poisson cdf with lambda l.</p>
  526. <p>This distribution is a discrete distribution that expresses the probability
  527. that any given number of intervals occurs in a fixed interval of time.</p>
  528. <p>The implemented algorithm here is based on the inverse transform sampling algorithm
  529. on Wikipedia: <a class="reference external" href="https://en.wikipedia.org/wiki/Poisson_distribution">https://en.wikipedia.org/wiki/Poisson_distribution</a></p>
  530. <p>This has been chosen, because it requires only a single random value for each call.
  531. Cumulative probabilities are examined in turn until one exceeds the random value.</p>
  532. <table class="docutils field-list" frame="void" rules="none">
  533. <col class="field-name" />
  534. <col class="field-body" />
  535. <tbody valign="top">
  536. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  537. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  538. <li><strong>l</strong> (<em>numeric</em>) – The average number of events that occur (i.e. lambda).</li>
  539. </ul>
  540. </td>
  541. </tr>
  542. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.int</p>
  543. </td>
  544. </tr>
  545. </tbody>
  546. </table>
  547. </dd></dl>
  548. <dl class="function">
  549. <dt id="pypdevsbbl.extra.rngstreams.distributions.PT5">
  550. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">PT5</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#PT5"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.PT5" title="Permalink to this definition">¶</a></dt>
  551. <dd><p>Inverse of the Pearson Type V cdf.</p>
  552. <p>This method makes use of the gamma distribution.</p>
  553. <table class="docutils field-list" frame="void" rules="none">
  554. <col class="field-name" />
  555. <col class="field-body" />
  556. <tbody valign="top">
  557. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  558. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  559. <li><strong>a</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  560. <li><strong>b</strong> (<em>numeric</em>) – The scale of the distribution.</li>
  561. </ul>
  562. </td>
  563. </tr>
  564. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  565. </td>
  566. </tr>
  567. </tbody>
  568. </table>
  569. </dd></dl>
  570. <dl class="function">
  571. <dt id="pypdevsbbl.extra.rngstreams.distributions.pearson5">
  572. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">pearson5</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.pearson5" title="Permalink to this definition">¶</a></dt>
  573. <dd><p>Alias of <a class="reference internal" href="#pypdevsbbl.extra.rngstreams.distributions.PT5" title="pypdevsbbl.extra.rngstreams.distributions.PT5"><code class="xref py py-meth docutils literal notranslate"><span class="pre">PT5()</span></code></a> for readability.</p>
  574. </dd></dl>
  575. <dl class="function">
  576. <dt id="pypdevsbbl.extra.rngstreams.distributions.PT6">
  577. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">PT6</code><span class="sig-paren">(</span><em>y</em>, <em>a1</em>, <em>a2</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#PT6"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.PT6" title="Permalink to this definition">¶</a></dt>
  578. <dd><p>Inverse of the Pearson Type VI cdf.</p>
  579. <table class="docutils field-list" frame="void" rules="none">
  580. <col class="field-name" />
  581. <col class="field-body" />
  582. <tbody valign="top">
  583. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  584. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  585. <li><strong>a1</strong> (<em>numeric</em>) – The shape of the first distribution.</li>
  586. <li><strong>a2</strong> (<em>numeric</em>) – The shape of the second distribution.</li>
  587. <li><strong>b</strong> (<em>numeric</em>) – The scale of the distribution.</li>
  588. </ul>
  589. </td>
  590. </tr>
  591. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  592. </td>
  593. </tr>
  594. </tbody>
  595. </table>
  596. </dd></dl>
  597. <dl class="function">
  598. <dt id="pypdevsbbl.extra.rngstreams.distributions.pearson6">
  599. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">pearson6</code><span class="sig-paren">(</span><em>y</em>, <em>a1</em>, <em>a2</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.pearson6" title="Permalink to this definition">¶</a></dt>
  600. <dd><p>Alias of <a class="reference internal" href="#pypdevsbbl.extra.rngstreams.distributions.PT6" title="pypdevsbbl.extra.rngstreams.distributions.PT6"><code class="xref py py-meth docutils literal notranslate"><span class="pre">PT6()</span></code></a> for readability.</p>
  601. </dd></dl>
  602. <dl class="function">
  603. <dt id="pypdevsbbl.extra.rngstreams.distributions.student">
  604. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">student</code><span class="sig-paren">(</span><em>y</em>, <em>v</em>, <em>step=0.001</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#student"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.student" title="Permalink to this definition">¶</a></dt>
  605. <dd><p>Approximation of the inverse student t-cdf with v degrees of freedom.</p>
  606. <p>This distribution is used for identifying unknowns in a distribution and occurs
  607. most often when estimating unknowns. When combined with RNG, these often arise
  608. in multi-dimensional applications of copula-dependency (dependence between variables).</p>
  609. <p>This implementation uses a simple sampling method, but requires discretization.
  610. For this to be accurate, minimize the step size to use.</p>
  611. <table class="docutils field-list" frame="void" rules="none">
  612. <col class="field-name" />
  613. <col class="field-body" />
  614. <tbody valign="top">
  615. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  616. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  617. <li><strong>v</strong> (<em>numeric</em>) – The degrees of freedom to use.</li>
  618. <li><strong>step</strong> (<em>float</em>) – The stepsize to use when sampling.</li>
  619. </ul>
  620. </td>
  621. </tr>
  622. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  623. </td>
  624. </tr>
  625. </tbody>
  626. </table>
  627. </dd></dl>
  628. <dl class="function">
  629. <dt id="pypdevsbbl.extra.rngstreams.distributions.triangular">
  630. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">triangular</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#triangular"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.triangular" title="Permalink to this definition">¶</a></dt>
  631. <dd><p>Inverse of the triangular distribution with minimum a, mode b and maximum c.</p>
  632. <p>This distribution is typically used as a subjective description of
  633. a population for which there is limited sample data, especially if
  634. the relationship between variables is known, but the data is scarse.</p>
  635. <p>Please be aware of the differences between b (mode) and c (maximum). Some sources
  636. use b and c the other way around (i.e. they use c as mode and b as maximum).</p>
  637. <p>There are also resources that encode these values in a single number q, which can
  638. be obtained via (a, b, c w.r.t. the parameters of <em>this</em> function):</p>
  639. <div class="math notranslate nohighlight">
  640. \[q = (b - a) / (c - a)\]</div>
  641. <table class="docutils field-list" frame="void" rules="none">
  642. <col class="field-name" />
  643. <col class="field-body" />
  644. <tbody valign="top">
  645. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  646. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  647. <li><strong>a</strong> (<em>numeric</em>) – The minimum.</li>
  648. <li><strong>b</strong> (<em>numeric</em>) – The mode.</li>
  649. <li><strong>c</strong> (<em>numeric</em>) – The maximum.</li>
  650. </ul>
  651. </td>
  652. </tr>
  653. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  654. </td>
  655. </tr>
  656. </tbody>
  657. </table>
  658. </dd></dl>
  659. <dl class="function">
  660. <dt id="pypdevsbbl.extra.rngstreams.distributions.uniform">
  661. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">uniform</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#uniform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.uniform" title="Permalink to this definition">¶</a></dt>
  662. <dd><p>Inverse of the uniform cdf over the range (a, b).</p>
  663. <table class="docutils field-list" frame="void" rules="none">
  664. <col class="field-name" />
  665. <col class="field-body" />
  666. <tbody valign="top">
  667. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  668. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  669. <li><strong>a</strong> (<em>numeric</em>) – The lower bound of the distribution.</li>
  670. <li><strong>b</strong> (<em>numeric</em>) – The upper bound of the distribution.</li>
  671. </ul>
  672. </td>
  673. </tr>
  674. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64 in the range (a, b).</p>
  675. </td>
  676. </tr>
  677. </tbody>
  678. </table>
  679. </dd></dl>
  680. <dl class="function">
  681. <dt id="pypdevsbbl.extra.rngstreams.distributions.uniformInt">
  682. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">uniformInt</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#uniformInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.uniformInt" title="Permalink to this definition">¶</a></dt>
  683. <dd><p>Inverse of the rounded uniform cdf over the range [a, b].</p>
  684. <table class="docutils field-list" frame="void" rules="none">
  685. <col class="field-name" />
  686. <col class="field-body" />
  687. <tbody valign="top">
  688. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  689. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  690. <li><strong>a</strong> (<em>numeric</em>) – The lower bound of the distribution.</li>
  691. <li><strong>b</strong> (<em>numeric</em>) – The upper bound of the distribution.</li>
  692. </ul>
  693. </td>
  694. </tr>
  695. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64 in the range [a, b].</p>
  696. </td>
  697. </tr>
  698. </tbody>
  699. </table>
  700. </dd></dl>
  701. <dl class="function">
  702. <dt id="pypdevsbbl.extra.rngstreams.distributions.wald">
  703. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">wald</code><span class="sig-paren">(</span><em>y</em>, <em>mu</em>, <em>l</em>, <em>step=0.001</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#wald"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.wald" title="Permalink to this definition">¶</a></dt>
  704. <dd><p>Approximation of the inverse Wald cdf.</p>
  705. <p>Also known as the Inverse Gaussian Distribution, the Wald distribution
  706. is commonly used to compute the properties of the Brownian Motion.</p>
  707. <table class="docutils field-list" frame="void" rules="none">
  708. <col class="field-name" />
  709. <col class="field-body" />
  710. <tbody valign="top">
  711. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  712. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  713. <li><strong>mu</strong> (<em>numeric</em>) – The mean of the distribution.</li>
  714. <li><strong>l</strong> (<em>numeric</em>) – The shape of the distribution.</li>
  715. <li><strong>step</strong> (<em>float</em>) – The stepsize to use when sampling.</li>
  716. </ul>
  717. </td>
  718. </tr>
  719. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  720. </td>
  721. </tr>
  722. </tbody>
  723. </table>
  724. </dd></dl>
  725. <dl class="function">
  726. <dt id="pypdevsbbl.extra.rngstreams.distributions.weibull">
  727. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">weibull</code><span class="sig-paren">(</span><em>y</em>, <em>a</em>, <em>b</em>, <em>v=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#weibull"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.weibull" title="Permalink to this definition">¶</a></dt>
  728. <dd><p>Inverse of the weibell cdf with scale a, shape b and location v.</p>
  729. <p>This distribution is most commonly used to predict the lifetime
  730. of technical equipment. The location is not often used, in which
  731. cases it is to be set at 0 (also the default).</p>
  732. <table class="docutils field-list" frame="void" rules="none">
  733. <col class="field-name" />
  734. <col class="field-body" />
  735. <tbody valign="top">
  736. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  737. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  738. <li><strong>a</strong> (<em>numeric</em>) – The scale of the curve.</li>
  739. <li><strong>b</strong> (<em>numeric</em>) – The shape parameter.</li>
  740. <li><strong>v</strong> (<em>numeric</em>) – The location parameter.
  741. Defaults to 0 (not often used).</li>
  742. </ul>
  743. </td>
  744. </tr>
  745. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  746. </td>
  747. </tr>
  748. </tbody>
  749. </table>
  750. </dd></dl>
  751. <dl class="function">
  752. <dt id="pypdevsbbl.extra.rngstreams.distributions.zipf">
  753. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">zipf</code><span class="sig-paren">(</span><em>y</em>, <em>s</em>, <em>N: int</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#zipf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions.zipf" title="Permalink to this definition">¶</a></dt>
  754. <dd><p>Inverse of a discrete cdf w.r.t. Zipf’s law.</p>
  755. <table class="docutils field-list" frame="void" rules="none">
  756. <col class="field-name" />
  757. <col class="field-body" />
  758. <tbody valign="top">
  759. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  760. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the function.</li>
  761. <li><strong>s</strong> (<em>numeric</em>) – The degrees of freedom to use.</li>
  762. <li><strong>N</strong> (<em>int</em>) – The degrees of freedom to use.</li>
  763. </ul>
  764. </td>
  765. </tr>
  766. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy.float64</p>
  767. </td>
  768. </tr>
  769. </tbody>
  770. </table>
  771. </dd></dl>
  772. <dl class="function">
  773. <dt id="pypdevsbbl.extra.rngstreams.distributions._sample">
  774. <code class="descclassname">pypdevsbbl.extra.rngstreams.distributions.</code><code class="descname">_sample</code><span class="sig-paren">(</span><em>y</em>, <em>f</em>, <em>step</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/rngstreams/distributions.html#_sample"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.rngstreams.distributions._sample" title="Permalink to this definition">¶</a></dt>
  775. <dd><p>Sampling method.</p>
  776. </dd></dl>
  777. </div>
  778. </div>
  779. </div>
  780. </div>
  781. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  782. <div class="sphinxsidebarwrapper">
  783. <h4>Previous topic</h4>
  784. <p class="topless"><a href="pypdevsbbl.extra.rngstreams.html"
  785. title="previous chapter">pypdevsbbl.extra.rngstreams package</a></p>
  786. <h4>Next topic</h4>
  787. <p class="topless"><a href="pypdevsbbl.extra.equations.html"
  788. title="next chapter">pypdevsbbl.extra.equations module</a></p>
  789. <div id="searchbox" style="display: none" role="search">
  790. <h3>Quick search</h3>
  791. <div class="searchformwrapper">
  792. <form class="search" action="search.html" method="get">
  793. <input type="text" name="q" />
  794. <input type="submit" value="Go" />
  795. <input type="hidden" name="check_keywords" value="yes" />
  796. <input type="hidden" name="area" value="default" />
  797. </form>
  798. </div>
  799. </div>
  800. <script type="text/javascript">$('#searchbox').show(0);</script>
  801. </div>
  802. </div>
  803. <div class="clearer"></div>
  804. </div>
  805. <div class="related" role="navigation" aria-label="related navigation">
  806. <h3>Navigation</h3>
  807. <ul>
  808. <li class="right" style="margin-right: 10px">
  809. <a href="genindex.html" title="General Index"
  810. >index</a></li>
  811. <li class="right" >
  812. <a href="py-modindex.html" title="Python Module Index"
  813. >modules</a> |</li>
  814. <li class="right" >
  815. <a href="pypdevsbbl.extra.equations.html" title="pypdevsbbl.extra.equations module"
  816. >next</a> |</li>
  817. <li class="right" >
  818. <a href="pypdevsbbl.extra.rngstreams.html" title="pypdevsbbl.extra.rngstreams package"
  819. >previous</a> |</li>
  820. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  821. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  822. <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" >pypdevsbbl.extra package</a> &#187;</li>
  823. <li class="nav-item nav-item-3"><a href="pypdevsbbl.extra.rngstreams.html" >pypdevsbbl.extra.rngstreams package</a> &#187;</li>
  824. </ul>
  825. </div>
  826. <div class="footer" role="contentinfo">
  827. &#169; Copyright 2020, Randy Paredis.
  828. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
  829. </div>
  830. </body>
  831. </html>