Skip to content

Decode one- and two-class forecasts to finite bin centers - #45

Open
sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix/finite-small-categorical-bin-centers-20261005
Open

sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix/finite-small-categorical-bin-centers-20261005

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Fixes #44.

Compute inverse bin centers from the original finite interval width. Deriving the width from the infinity-extended forward edges produced nonfinite decoded values for one- and two-class heads. Forward digitization, tail assignment, output shape and the default class count remain unchanged.

Validation

30 tests pass across zapbench.ts_forecasting.util_test, heads_test and the new small_categorical_bins_test. The 15 new cases cover one/two/three/ten/64 classes, shifted bounds, forward/inverse agreement, eager/JIT decoding and actual head modes, samples, loss and gradients. Six new tests fail on unchanged upstream and nine controls pass.

The broad unittest runner initializes the standard Abseil flags so existing temporary-file tests can run. Real Distrax/TFP modules were used; no class or distribution mocks are involved. Existing JAX one-hot dtype warnings were emitted. No dataset, model weights or training run was needed.

Tested on macOS CPU with real package imports. New test formatting, scoped static checks, Python syntax and git diff --check pass. No dependency or workflow files change. Accelerator execution and the full repository suite were not run.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Categorical decoding produces nonfinite values with one or two classes

1 participant