Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The stereo regression training pipeline uses multi-target XGBoost to predict res

By default, regression uses the extended feature set. An optional reduced set can
be selected with `--feature_profile reduced`; it contains the array-level geometry
and energy quantities plus `width_length`, `R_core`, and `loss` summaries for
telescope positions 0--3. The default is unchanged with `--feature_profile extended`.
and energy quantities plus `R_core` and `loss` summaries for telescope positions
0--3. The default is unchanged with `--feature_profile extended`.

**Key techniques:**

Expand Down
4 changes: 2 additions & 2 deletions src/eventdisplay_ml/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def configure_training(analysis_type):
default="extended",
help=(
"Regression feature set. 'extended' retains all non-target features; "
"'reduced' uses array-level quantities and width/length, R_core, "
"and loss summaries for telescope positions 0-3."
"'reduced' uses array-level quantities plus R_core and loss summaries "
"for telescope positions 0-3."
),
)
if analysis_type == "classification":
Expand Down
3 changes: 0 additions & 3 deletions src/eventdisplay_ml/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,9 +1388,6 @@ def flatten_telescope_variables(
new_cols[f"loss_dist_{i}"] = df_flat[f"loss_{i}"] * df_flat[f"dist_{i}"]
if f"size_{i}" in df_flat and f"dist_{i}" in df_flat and keep_size_vars:
new_cols[f"size_dist2_{i}"] = df_flat[f"size_{i}"] / (df_flat[f"dist_{i}"] ** 2 + 1e-6)
if f"width_{i}" in df_flat and f"length_{i}" in df_flat:
new_cols[f"width_length_{i}"] = df_flat[f"width_{i}"] / (df_flat[f"length_{i}"] + 1e-6)

df_flat = pd.concat([df_flat, pd.DataFrame(new_cols, index=index)], axis=1)

# inspect ordering and magnitudes before clipping/log10
Expand Down
1 change: 0 additions & 1 deletion src/eventdisplay_ml/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def regression_feature_columns(columns, profile="extended"):
"EmissionHeight",
"Geomagnetic_Angle",
"array_footprint",
*[f"width_length_{i}" for i in range(4)],
*[f"R_core_{i}" for i in range(4)],
*[f"loss_{i}" for i in range(4)],
]
Expand Down
1 change: 1 addition & 0 deletions tests/test_data_processing_remaining.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def test_flatten_feature_data_drops_size_columns_for_classification(tel_config):

assert "size_0" not in result.columns
assert "size_dist2_0" not in result.columns
assert "width_length_0" not in result.columns
assert "cosphi_0" in result.columns
assert "ze_bin" in result.columns

Expand Down
3 changes: 0 additions & 3 deletions tests/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def test_reduced_regression_feature_columns_are_stable_and_exact():
"EmissionHeight",
"Geomagnetic_Angle",
"array_footprint",
*[f"width_length_{i}" for i in range(4)],
*[f"R_core_{i}" for i in range(4)],
*[f"loss_{i}" for i in range(4)],
"E_residual",
Expand All @@ -107,7 +106,6 @@ def test_reduced_regression_feature_columns_are_stable_and_exact():
"EmissionHeight",
"Geomagnetic_Angle",
"array_footprint",
*[f"width_length_{i}" for i in range(4)],
*[f"R_core_{i}" for i in range(4)],
*[f"loss_{i}" for i in range(4)],
]
Expand All @@ -129,7 +127,6 @@ def test_reduced_regression_feature_columns_require_all_requested_columns():
"EmissionHeight",
"Geomagnetic_Angle",
"array_footprint",
*[f"width_length_{i}" for i in range(4)],
*[f"R_core_{i}" for i in range(4)],
*[f"loss_{i}" for i in range(3)],
],
Expand Down
1 change: 0 additions & 1 deletion tests/test_regression_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def test_regression_training_reduced_profile_selects_requested_columns(monkeypat
"EmissionHeight",
"Geomagnetic_Angle",
"array_footprint",
*[f"width_length_{i}" for i in range(4)],
*[f"R_core_{i}" for i in range(4)],
*[f"loss_{i}" for i in range(4)],
]
Expand Down
Loading