Merged
Conversation
Contributor
There was a problem hiding this comment.
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.pyto compute optimized gamma-efficiency cuts (and derived efficiencies/thresholds/significance) and write results to an ECSV table. - Add
plot_optimize_classification.pyto 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_stateinto 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. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.