Python & Scipy: How to install von mises distribution?

I am trying to set the von Mises distribution from scipy ( http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.vonmises.html )

So i tried

from scipy.stats import vonmises
kappa = 3
r = vonmises.rvs(kappa, size=1000)
plt.hist(r, normed=True,alpha=0.2)

He returns

enter image description here

However, when I enter data on it

vonmises.fit(r)
# returns (1.2222011312461918, 0.024913780423670054, 2.4243546157480105e-30)

vonmises.fit(r, loc=0, scale=1)
# returns (1.549290021706847, 0.0013319431181202394, 7.1653626652619939e-29)

But none of the returned values ​​is a parameter of Von Mises, kappa.

What is the return value? Ifeel is loc or average. But I have no idea what the first return value is.

And how do I fit the von mises distribution?

+4
source share
1 answer

: kappa, loc scale. , von Mises pdf . , :

>>> vonmises.fit(r, fscale=1)
(2.994517240859579, -0.0080482378119089287, 1)
+7

Source: https://habr.com/ru/post/1651680/


All Articles