mthh / jenkspy

Compute Natural Breaks in Python (Fisher-Jenks algorithm)

Home Page:https://pypi.python.org/pypi/jenkspy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: return goodness of variance fit metric

elizabethswkim opened this issue · comments

Thanks for the implementation!

It's hard to decide how many breaks to use without seeing the comparing goodness of fit metrics.

Am I missing something? I don't think this implementation does that. I'm currently calculating this myself after finding breaks using your implementation.

(Also, I also tried modifying your code, but it's a little hard to read. It looks like you're calculating goodness of variance fit in lines 38-61 in _jenks.c? I'm not fluent in c, and so without comments, and with variable names like s1, s2, i3, i4, m1, and m2, it's a heavier lift to figure out what's going on than I can pull off at the moment. Comments or more descriptive variable identifiers would help a lot!)

Thanks again!

Closed by #17 thanks to @maugomesqueiroz !