Summary
Add a weighted_sum_filter(weights, k) function as a Phase.filter_fn alternative to top_k_pareto_filter. It collapses multiple objectives into a single weighted sum and keeps the top-K configs.
Motivation
When users have clear preferences (e.g. "80% MAE, 15% coverage, 5% RMSE"), scalarization provides a straightforward total ordering rather than a Pareto front. This complements weighted Pareto (#90) for users who want a single best answer rather than a set of trade-offs.
Scope
- New function
weighted_sum_filter(weights, k, objective_names=None) returning a Phase.filter_fn-compatible callable
- Direction-aware: flip MAXIMIZE objectives before summing (or negate weights)
- Normalize scores before weighting (min-max or z-score) to handle different scales
- Export from
__init__.py
- Tests covering mixed directions, subset objectives, edge cases
- No new dependencies (numpy only)
Summary
Add a
weighted_sum_filter(weights, k)function as aPhase.filter_fnalternative totop_k_pareto_filter. It collapses multiple objectives into a single weighted sum and keeps the top-K configs.Motivation
When users have clear preferences (e.g. "80% MAE, 15% coverage, 5% RMSE"), scalarization provides a straightforward total ordering rather than a Pareto front. This complements weighted Pareto (#90) for users who want a single best answer rather than a set of trade-offs.
Scope
weighted_sum_filter(weights, k, objective_names=None)returning aPhase.filter_fn-compatible callable__init__.py