feat: add Observable.weight and weighted_sum_filter#96
Merged
jc-macdonald merged 1 commit intomainfrom Apr 17, 2026
Merged
Conversation
- Add weight: float = 1.0 to Observable (backward-compatible) - Propagate weights through extract_front, pareto_rank, hypervolume, igd_plus via new _normalize_objectives helper - Propagate weights through Study.front, Study.front_hypervolume, Study.summary, top_k_pareto_filter, and run_adaptive - Add weighted_sum_filter: scalarised ranking filter with min-max normalisation, direction-aware, compatible with Phase.filter_fn - Export weighted_sum_filter from trade_study.__init__ - 13 new tests covering weighted Pareto and weighted_sum_filter Closes #90, closes #91
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
Adds weighted multi-objective support via two complementary features:
Observable.weight (#90)
weight: float = 1.0field onObservable(backward-compatible default)extract_front,pareto_rank,hypervolume,igd_plusStudy.front(),Study.front_hypervolume(),Study.summary(),top_k_pareto_filterrun_adaptive()(scales optuna objective values)weighted_sum_filter (#91)
weighted_sum_filter(weights, k)returning aPhase.filter_fn-compatible callabletrade_study.__init__Tests
test_pareto.py, 8 intest_study.py)Closes #90, closes #91