Skip to content

Add weighted_sum_filter for single-objective scalarized ranking #91

@jc-macdonald

Description

@jc-macdonald

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumShould fixfeatureNew feature or enhancementstudystudy.py module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions