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

Circular mean function #6

Open
JeffBelgum opened this issue Aug 4, 2015 · 2 comments
Open

Circular mean function #6

JeffBelgum opened this issue Aug 4, 2015 · 2 comments

Comments

@JeffBelgum
Copy link
Owner

Create a function that returns the mean of circular values. Care should be taken to account for wrapping values and the function should handle both degrees and radians.

@justin-uy
Copy link
Contributor

Does this function look like a reasonable model?
https://github.com/jhamrick/python-course/blob/master/week4/stats/circ.py#L39

@JeffBelgum
Copy link
Owner Author

That looks good, the link it references also looks good http://www.jstatsoft.org/v31/i10

And here are a few test cases you might use:

  1. [15, 355] -> 4.99999999999 (Degrees)
  2. [pi/4, -pi/4] -> 0 (Radians)
  3. [pi/3, 2*pi-pi/6] -> 0.261799387799 (Radians)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants