Wave 1 Best Model TE Curve Plots
Plot Wave 1 family-best TE predictions on held-out test curves.
- class scripts.reports.analysis.plot_wave1_best_model_te_curves.LoadedFamilyModel(family_name, model_type, run_name, run_instance_id, registry_entry, training_config, model_object)[source]
Bases:
objectLoaded family-best model plus registry and config metadata.
- Parameters:
family_name (str)
model_type (str)
run_name (str)
run_instance_id (str)
registry_entry (dict[str, Any])
training_config (dict[str, Any])
model_object (Any)
- family_name: str
- model_type: str
- run_name: str
- run_instance_id: str
- registry_entry: dict[str, Any]
- training_config: dict[str, Any]
- model_object: Any
- scripts.reports.analysis.plot_wave1_best_model_te_curves.build_argument_parser()[source]
Build the command-line argument parser.
- Return type:
ArgumentParser
- scripts.reports.analysis.plot_wave1_best_model_te_curves.parse_command_line_arguments()[source]
Parse command-line arguments.
- Return type:
Namespace
- scripts.reports.analysis.plot_wave1_best_model_te_curves.load_yaml_dictionary(yaml_path)[source]
Load one YAML dictionary from disk.
- Parameters:
yaml_path (Path)
- Return type:
dict[str, Any]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.resolve_timestamped_output_paths(output_root, report_topic_root)[source]
Resolve the timestamped artifact and report directories.
- Parameters:
output_root (Path)
report_topic_root (Path)
- Return type:
tuple[str, Path, Path]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.load_family_best_entry(family_registry_root, family_name)[source]
Load the current best registry entry for one model family.
- Parameters:
family_registry_root (Path)
family_name (str)
- Return type:
dict[str, Any]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.load_family_training_config(best_entry)[source]
Load the immutable training config snapshot for one best entry.
- Parameters:
best_entry (dict[str, Any])
- Return type:
dict[str, Any]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.load_neural_regression_module(best_entry, training_config)[source]
Load one family-best Lightning regression checkpoint.
- Parameters:
best_entry (dict[str, Any])
training_config (dict[str, Any])
- Return type:
- scripts.reports.analysis.plot_wave1_best_model_te_curves.load_wave1_family_best_models(family_name_list, family_registry_root)[source]
Load the current best model artifact for each requested Wave 1 family.
- Parameters:
family_name_list (list[str])
family_registry_root (Path)
- Return type:
list[LoadedFamilyModel]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.build_canonical_test_dataset(reference_training_config)[source]
Build the canonical test dataset from the approved Wave 1 split config.
- Parameters:
reference_training_config (dict[str, Any])
- scripts.reports.analysis.plot_wave1_best_model_te_curves.select_curve_indices(test_curve_count, sample_fraction, max_curves, random_seed)[source]
Select a deterministic subset of test curves.
- Parameters:
test_curve_count (int)
sample_fraction (float)
max_curves (int | None)
random_seed (int)
- Return type:
list[int]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.predict_curve_with_loaded_model(loaded_model, input_tensor)[source]
Predict one full TE curve with one loaded family-best model.
- Parameters:
loaded_model (LoadedFamilyModel)
input_tensor (Tensor)
- Return type:
ndarray
- scripts.reports.analysis.plot_wave1_best_model_te_curves.compute_curve_metrics(target_curve, predicted_curve)[source]
Compute curve-level TE prediction metrics.
- Parameters:
target_curve (ndarray)
predicted_curve (ndarray)
- Return type:
dict[str, float]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.summarize_model_metrics(metric_dictionary_list)[source]
Average curve metrics for one model.
- Parameters:
metric_dictionary_list (list[dict[str, float]])
- Return type:
dict[str, float]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.sanitize_filename_fragment(raw_value)[source]
Sanitize one value for use inside generated artifact filenames.
- Parameters:
raw_value (str)
- Return type:
str
- scripts.reports.analysis.plot_wave1_best_model_te_curves.save_prediction_csv(prediction_csv_path, angular_position_deg, target_curve_deg, prediction_dictionary)[source]
Save one per-point prediction table for a TE curve.
- Parameters:
prediction_csv_path (Path)
angular_position_deg (ndarray)
target_curve_deg (ndarray)
prediction_dictionary (dict[str, ndarray])
- Return type:
None
- scripts.reports.analysis.plot_wave1_best_model_te_curves.save_prediction_plot(plot_path, angular_position_deg, target_curve_deg, prediction_dictionary, curve_title)[source]
Save one TE-curve overlay plot.
- Parameters:
plot_path (Path)
angular_position_deg (ndarray)
target_curve_deg (ndarray)
prediction_dictionary (dict[str, ndarray])
curve_title (str)
- Return type:
None
- scripts.reports.analysis.plot_wave1_best_model_te_curves.evaluate_selected_curves(loaded_model_list, test_dataset, selected_curve_index_list, output_directory, write_plots)[source]
Evaluate selected test curves and persist per-curve artifacts.
- Parameters:
loaded_model_list (list[LoadedFamilyModel])
selected_curve_index_list (list[int])
output_directory (Path)
write_plots (bool)
- Return type:
tuple[list[dict[str, Any]], dict[str, dict[str, float]], list[str], list[str]]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.save_per_curve_metrics_csv(output_directory, curve_entry_list)[source]
Save one compact per-curve metrics table.
- Parameters:
output_directory (Path)
curve_entry_list (list[dict[str, Any]])
- Return type:
Path
- scripts.reports.analysis.plot_wave1_best_model_te_curves.build_validation_summary(run_instance_id, output_directory, report_path, loaded_model_list, dataset_split_summary, selected_curve_index_list, sample_fraction, random_seed, aggregate_metric_dictionary, curve_entry_list, per_curve_metrics_csv_path, plot_path_list)[source]
Build the machine-readable validation summary.
- Parameters:
run_instance_id (str)
output_directory (Path)
report_path (Path)
loaded_model_list (list[LoadedFamilyModel])
selected_curve_index_list (list[int])
sample_fraction (float)
random_seed (int)
aggregate_metric_dictionary (dict[str, dict[str, float]])
curve_entry_list (list[dict[str, Any]])
per_curve_metrics_csv_path (Path)
plot_path_list (list[str])
- Return type:
dict[str, Any]
- scripts.reports.analysis.plot_wave1_best_model_te_curves.build_report_markdown(validation_summary)[source]
Build the Markdown comparison report.
- Parameters:
validation_summary (dict[str, Any])
- Return type:
str