Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribution fitting is not working #57

Open
mayanksuman opened this issue Jan 15, 2018 · 1 comment
Open

Distribution fitting is not working #57

mayanksuman opened this issue Jan 15, 2018 · 1 comment
Labels

Comments

@mayanksuman
Copy link

mayanksuman commented Jan 15, 2018

I used the example code for fitting triangular distribution.

from pycircstat.distributions import triangular
import matplotlib.pyplot as plt
import numpy as np

rho = .4
t = np.linspace(0,2*np.pi,1000)
x = triangular.rvs(rho, size=5000)
plt.plot(t, triangular.pdf(t, rho))
plt.plot(t, triangular.cdf(t, rho))
plt.hist(x, bins=50, normed=True)
plt.show()

However, this code fails with error that optimization fail to converge after 100 iteration. Same is the case with cardioid distribution.

@fabiansinz
Copy link
Contributor

Ok, I verified that. Seems to be a change on the scipy side. Basically, the rvs is using an optimization procedure from scipy via scipy.stats. That worked in the past, but does not anymore. We need to investigate how to best fix that.

@fabiansinz fabiansinz added the bug label Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants