Gaussian¶
Normal distribution with parameters mu and sigma.
Attributes¶
-
mode
Most likely value.
-
mu
-
n_samples
The number of observed samples.
-
sigma
Examples¶
>>> from river import proba
>>> p = proba.Gaussian().update(6).update(7)
>>> p
𝒩(μ=6.500, σ=0.707)
>>> p.pdf(6.5)
0.564189
>>> p.revert(7)
𝒩(μ=6.000, σ=0.000)
Methods¶
cdf
Cumulative density function, i.e. P(X <= x).
Parameters
- x
Probability density function, i.e. P(x <= X < x+dx) / dx.
Parameters
- x
revert
Reverts the parameters of the distribution for a given observation.
Parameters
- x
- w – defaults to
1.0
update
Updates the parameters of the distribution given a new observation.
Parameters
- x
- w – defaults to
1.0