Skip to content

Support integer-typed numerical attributes and heuristic measurements#40

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/934599320
Open

Support integer-typed numerical attributes and heuristic measurements#40
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/934599320

Conversation

@copybara-service

Copy link
Copy Markdown

Support integer-typed numerical attributes and heuristic measurements

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.

@copybara-service copybara-service Bot force-pushed the cl/934599320 branch 4 times, most recently from c2eb289 to 7877059 Compare June 19, 2026 01:01
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
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.

0 participants