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

Include variance_combinations in the output of jenks.jenks() #6

Open
joaogb opened this issue Mar 16, 2016 · 3 comments
Open

Include variance_combinations in the output of jenks.jenks() #6

joaogb opened this issue Mar 16, 2016 · 3 comments

Comments

@joaogb
Copy link

joaogb commented Mar 16, 2016

It seems to me that we should include variance_combinations in the output of jenks.jenks() instead of discarding the data. This would allow one to compute the goodness of variance fit, for example.

I suggest:

(...)
lower_class_limits, variance_combinations = jenks_matrices(data, n_classes)
(...)
return {'breaks':kclass, 'variance_combinations':variance_combinations}

@perrygeo
Copy link
Owner

That sounds like a good idea but would change the interface significantly. I'd accept a pull request if you wanted to make it a separate function.

@joaogb
Copy link
Author

joaogb commented Mar 16, 2016

How about adding a parameter varInResults to the list of arguments? If true, the function would return the dict with the breaks and variance. Otherwise, it would return the breaks as it currently does. This parameter would default to False for backwards compatibility.

@perrygeo
Copy link
Owner

👍 sounds good to me, probably should follow the numpy convention and name it return_variance_dict

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