Skip to content

XGB gh cut optimization#56

Merged
GernotMaier merged 12 commits intomainfrom
xgb-gh
Apr 10, 2026
Merged

XGB gh cut optimization#56
GernotMaier merged 12 commits intomainfrom
xgb-gh

Conversation

@GernotMaier
Copy link
Copy Markdown
Member

No description provided.

@GernotMaier GernotMaier self-assigned this Apr 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new workflow to derive and visualize energy/zenith-dependent gamma/hadron separation cuts by maximizing Li & Ma significance using precomputed rate surfaces and the trained classification ROC curves.

Changes:

  • Add optimize_classification.py to compute optimized gamma-efficiency cuts (and derived efficiencies/thresholds/significance) and write results to an ECSV table.
  • Add plot_optimize_classification.py to generate 1D (per-zenith) and 2D (energy vs zenith) diagnostic plots from the ECSV output.
  • Improve classification training/config behavior (fail fast on empty datasets; propagate max_cores/random_state into model hyperparameters) and update the conda environment.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/eventdisplay_ml/scripts/optimize_classification.py New script to optimize cut surfaces and export results to ECSV.
src/eventdisplay_ml/scripts/plot_optimize_classification.py New plotting script for inspecting optimization outputs.
src/eventdisplay_ml/models.py Classification training now errors on empty inputs instead of silently skipping.
src/eventdisplay_ml/config.py Clarifies --max_events semantics and propagates n_jobs/random_state into model hyperparameters.
environment.yml Adds astropy-base and pins xgboost.
docs/changes/56.feature.md Towncrier fragment describing the new cut-optimization feature.

GernotMaier and others added 2 commits April 10, 2026 09:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@GernotMaier GernotMaier marked this pull request as ready for review April 10, 2026 07:47
@GernotMaier GernotMaier merged commit a58bcc0 into main Apr 10, 2026
3 checks passed
@GernotMaier GernotMaier deleted the xgb-gh branch April 10, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants