Support integer-typed numerical attributes and heuristic measurements#40
Open
copybara-service[bot] wants to merge 1 commit into
Open
Support integer-typed numerical attributes and heuristic measurements#40copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
c2eb289 to
7877059
Compare
NumericalInitializer changes: - For integer-typed attributes, snap quantile edges to the integer lattice via floor(). - Set upper=max_value+1 so edges can reach max_value after floor, allowing the last bin to capture concentrated mass there. Edges at max_value are removed from bin_edges and their count absorbed into the last bin's weight. - Use positive jitter U(0, 0.5) for integer data so that integer points are never pushed across a boundary before floor. - Add _zcdp_rho property derived from the composed dp_event. - Accept an optional estimated_total in __call__(). When provided, construct a heuristic LinearMeasurement assuming uniform counts across original bins with stddev = 1/sqrt(rho). vectorized_transformations changes: - Format integer bin intervals as [low, high] (closed-closed) instead of (low-1, high] (open-closed) for readability. PiperOrigin-RevId: 934599320
7877059 to
7ff10f4
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.
Support integer-typed numerical attributes and heuristic measurements
NumericalInitializer changes:
lattice via floor().
allowing the last bin to capture concentrated mass there. Edges at
max_value are removed from bin_edges and their count absorbed into
the last bin's weight.
points are never pushed across a boundary before floor.
construct a heuristic LinearMeasurement assuming uniform counts
across original bins with stddev = 1/sqrt(rho).
vectorized_transformations changes:
of (low-1, high] (open-closed) for readability.