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
Adds new absmax aggregation method #76
Conversation
@yadsirhc Does having a absmin function make any sense at all? If so, perhaps package it in with this PR? |
I have yet to encounter a use case firsthand where an absmin function would make sense. I did consider adding one for the sake of symmetry, but soon realized that it would not be able to leverage built-in Python aggregation functions, so it felt like overkill. |
@yadsirhc Python is not my expertise, but would this be too inefficient:
If Python can do that efficiently then it might also be possible to simplify your implementation of absmax with:
It all depends on how efficiently Python implements abs. |
Thanks for the suggestion. For small arrays it appears to be a negligible performance hit (~50 ns) for absmax versus the prior commit, but the code is much cleaner. In the case of absmin, I doubt another reimplementation could beat this one. |
@esc does this look mergeable to you? |
@yadsirhc can you please rebase this to the latest changes in whisper.git master? |
absmax is a new aggregation method which returns the largest absolute value when aggregating to a lower precision archive. Useful for data such as time offsets, where you care about retaining the value furthest from zero when aggregating but would prefer to preserve whether the offset was positive or negative.
Also refactors absmax to use a lambda function with max.
@SEJeff Done. Also updated the README to reflect avg_zero since it was the reason for the conflicts but hadn't itself been documented. |
@yadsirhc - could you please rebase your change if still needed? |
absmax is a new aggregation method which returns the largest absolute value when aggregating to a lower precision archive. Useful for data such as time offsets, where you care about retaining the value furthest from zero when aggregating but would prefer to preserve whether the offset was positive or negative.
Also refactors absmax to use a lambda function with max.
Rebased, as requested. |
No conflicts remain with the base branch. Is the rebaseneeded label still appropriate? What is preventing merge now (or back in Aug 2016, for that matter)? |
Hello @yadsirhc, |
absmax is a new aggregation method which returns the largest
absolute value when aggregating to a lower precision archive.
Useful for data such as time offsets, where you care about retaining
the value furthest from zero when aggregating but would prefer to
preserve whether the offset was positive or negative.