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

[FIX] Statistics.countnans/bincount: Fix NaN Counting, Consider Implicit Zeros #2698

Merged
merged 20 commits into from
Oct 21, 2017

Conversation

pavlin-policar
Copy link
Collaborator

@pavlin-policar pavlin-policar commented Oct 20, 2017

Issue

The statistics module implementation of countnans did not support the axis argument. Moreover, it appeared to have been computing number of NaNs incorrectly on sparse data in general.

Description of changes
  • Refactor bincount to properly count implicit and explicit zeros, with full weight support.
  • Add implementation of countnans which correctly counts NaNs and supports the axis keyword.
  • Add dense_sparse decorator for facilitating testing.

See #2558 for discussion.

Includes
  • Code changes
  • Tests
  • Documentation

The previous implementation didn't return zero counts for sparse
matrices and treated them as NaNs. This was changed and the tests have
been updated.
@nikicc nikicc changed the title Statistics.countnans/bincount [FIX] Statistics.countnans/bincount: Consider Implicit Zeros\ Oct 20, 2017
@nikicc nikicc changed the title [FIX] Statistics.countnans/bincount: Consider Implicit Zeros\ [FIX] Statistics.countnans/bincount: Consider Implicit Zeros Oct 20, 2017
@nikicc nikicc changed the title [FIX] Statistics.countnans/bincount: Consider Implicit Zeros [FIX] Statistics.countnans/bincount Oct 20, 2017
@nikicc nikicc changed the title [FIX] Statistics.countnans/bincount [FIX] Statistics.countnans/bincount: Fix NaN Counting, Consider Implicit Zeros Oct 20, 2017
@nikicc
Copy link
Contributor

nikicc commented Oct 20, 2017

@pavlin-policar the tests still fail 😞

@pavlin-policar
Copy link
Collaborator Author

pavlin-policar commented Oct 21, 2017

@nikicc Finally passing 😄 I don't think I can do anything about pylint though...

@pavlin-policar pavlin-policar deleted the statistics-countnans-bincount branch October 22, 2017 07:44
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

Successfully merging this pull request may close these issues.

2 participants