Spaces:
Sleeping
Sleeping
File size: 624 Bytes
0fff343 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """Deterministic single-set baseline.
Picks the top-K features straight from the prefilter shortlist and treats
them as one feature set. Used as both an internal sanity check (the GP
should match or beat it) and as the fast scaffold for the permutation
null distribution.
"""
from __future__ import annotations
from engine.program import Program
BASELINE_K = 8
def make_baseline(shortlist: list[str], k: int = BASELINE_K) -> Program:
"""The first `k` IDs from `shortlist` as a single feature set."""
p = Program(feature_sets=[list(shortlist[:k])])
p.program_id = "baseline"
p.born = False
return p
|