Repository navigation
Conversation
This is now used by the MAE criterion. It is supposed to make re-computing the median faster when the split is updated.
Member
Author
|
Yes, the implementation is definitely wrong (I have some ideas on what to check, lots of opportunities for sign or off-by-one errors), but I'm for the moment more concerned with how the scaling didn't improve, despite what seems to be clearly removing an inner loop. There might be another inner loop somewhere (for example, when sorting the array used by WeightedMedianCalculator each time an item gets pushed, but that might not be the case because items are moved from right-to-left and put on the end before bubbling, so they shouldn't have to bubble far if at all). I'm trying to get some kind of profiling solution working but haven't been successful. All I've gotten is that pretty much all the time is spent in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issue
Fixes #9553
What does this implement/fix? Explain your changes.
Modifies the MAE criterion and the WeightedMedianCalculator so that the median is updated in basically constant time each time a push or remove occurs, rather than re-computing the median from scratch every time the split is updated.
Any other comments?
This is a work in progress. Right now everything should be implemented and isn't crashing, but the code is scaling the same as it was before the change, for unknown reasons.