Skip to content

Distribution fitting is not working #57

Description

@mayanksuman

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions