feat(erp): match bounded multi-family observations - #381
Closed
zzylol wants to merge 2 commits into
Closed
Conversation
Contributor
Author
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.
Why
Observed production data rarely belongs exactly to one named distribution. Hard-classifying it as uniform or Zipf can select an unrelated empirical profile for mixed, truncated-tail, drifting, or out-of-distribution inputs.
What
How
Planner evaluates every retained fit against compatible benchmark shapes, combines cardinality, parameter, feature, temporal, and evidence distances, then applies ambiguity and OOD gates before ERP accuracy/resource selection. It does not require the observer to name one family first.
Before this PR
The v1 contract carried one family and parameter map. The backend thresholded one rank-frequency slope into uniform or Zipf, and Planner only matched equal families.
After this PR
A caller can retain competing fits and their quality evidence. Poor or ambiguous observations produce an ERP miss, allowing Hybrid mode to use theoretical sizing and then exact execution.
Verification
cargo fmt --all -- --check— passed.cargo test -p asap-aware-mapping erp --lib— 8 passed, including confident multi-fit selection and ambiguous/poor-fit rejection.Limitations and follow-up
Backend feature extraction and sketch-bench canonical feature export require coordinated follow-up PRs. Current backend v1 observation remains the narrower uniform/Zipf compatibility stage until those land.