Fix biased DP quantiles utility bug introduced from recent quantiles refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values.#90
Merged
Conversation
ef21b8e to
23e6df1
Compare
5686d56 to
f5c7289
Compare
…refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values. There are two separate ways to jitter depending on whether the attribute is int or float. For int, we expand each histogram bin into 4*m bins by randomly assigning each example to one of the equivalent bins (done in bulk via multinomial). For float, we move each example to one of the nearby bins symmetrically (done in bulk via multinomial). PiperOrigin-RevId: 947195276
f5c7289 to
ce8e6ec
Compare
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.
Fix biased DP quantiles utility bug introduced from recent quantiles refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values.
There are two separate ways to jitter depending on whether the attribute is int or float. For int, we expand each histogram bin into 4*m bins by randomly assigning each example to one of the equivalent bins (done in bulk via multinomial). For float, we move each example to one of the nearby bins symmetrically (done in bulk via multinomial).