latent.optimize.analysis¶
Statistical analysis of optimization trajectories.
Functions¶
analyze_trajectory¶
Analyze an optimization trajectory.
Computes:
- improvement: delta between first and last kept experiment score.
- kept_rate: fraction of experiments that were kept (Wilson CI).
- convergence_delta: absolute change in running best over last 20% of experiments.
Args: result: OptimizationResult from any optimizer.
Returns: StatisticalReport with three MetricResults.
compare_optimizers¶
Compare two optimizer runs using paired bootstrap.
Extracts per-experiment scores (excluding errors) from both results, truncates to equal length, and runs a continuous paired comparison.
Args: result_a: First optimizer result (treated as system A). result_b: Second optimizer result (treated as system B).
Returns: ComparisonResult with delta, CI, p-value, effect size.