gloss.strategies — the three streams¶
Global stream¶
- gloss.strategies.global_best.find_global_best(surrogate, space, n_points, excluded, direction, tolerance=0.0, n_random_samples=10000, n_top=10, kappa=2.0, diversity_radius=0.0, diversity_metric='euclidean')[source]¶
Find globally optimal points according to surrogate predictions.
Uses UCB acquisition (mu + kappa*sigma) when the surrogate supports uncertainty estimation, otherwise falls back to plain predicted value. kappa=0 disables UCB and uses pure predicted mean.
- diversity_radius: minimum distance between selected points in the batch.
0.0 (default) disables diversity enforcement.
diversity_metric: ‘euclidean’ (default) or ‘jaccard’ for Tanimoto distance.
Local stream¶
- gloss.strategies.local_best.find_local_best(surrogate, space, n_points, excluded, direction, tolerance=0.0, window_radius=None, n_random_samples=10000, distance_metric='euclidean', top_k=None)[source]¶
Find locally optimal points — better than all neighbors within a window.
- top_k controls the O(K) truncation in discrete mode:
None (default): use max(500, n_points * 50) — production default
int >= 1: scan exactly top-k candidates by predicted mean
0: scan all candidates (O(n) — no truncation; for ablation)
Has no effect in continuous mode.