Repository navigation
Decode one- and two-class forecasts to finite bin centers - #45
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
This branch has not been deployed
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.
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_testand the newsmall_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 --checkpass. No dependency or workflow files change. Accelerator execution and the full repository suite were not run.