A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.pymc.io/projects/docs/en/stable/api/distributions/generated/pymc.HalfNormal.html below:

pymc.HalfNormal — PyMC 5.25.1 documentation

pymc.HalfNormal#
class pymc.HalfNormal(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, **kwargs)[source]#

Half-normal distribution.

The pdf of this distribution is

\[ \begin{align}\begin{aligned}f(x \mid \tau) = \sqrt{\frac{2\tau}{\pi}} \exp\left(\frac{-x^2 \tau}{2}\right)\\f(x \mid \sigma) = \sqrt{\frac{2}{\pi\sigma^2}} \exp\left(\frac{-x^2}{2\sigma^2}\right)\end{aligned}\end{align} \]

Note

The parameters sigma/tau (\(\sigma\)/\(\tau\)) refer to the standard deviation/precision of the unfolded normal distribution, for the standard deviation of the half-normal distribution, see below. For the half-normal, they are just two parameterisation \(\sigma^2 \equiv \frac{1}{\tau}\) of a scale parameter.

(Source code, png, hires.png, pdf)

Parameters:
sigmatensor_like of float, optional

Scale parameter \(\sigma\) (sigma > 0) (only required if tau is not specified). Defaults to 1.

tautensor_like of float, optional

Precision \(\tau\) (tau > 0) (only required if sigma is not specified). Defaults to 1.

Examples

with pm.Model():
    x = pm.HalfNormal("x", sigma=10)

with pm.Model():
    x = pm.HalfNormal("x", tau=1 / 15)

Methods


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4