Skip to content

Commit

Permalink
Use double transpose to selected run subset
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-ragonnet committed Sep 15, 2023
1 parent c063f08 commit 7a899be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autumn/projects/sm_covid2/common_school/runner_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def opti_func(sample_dict):
plot_opti_params(retained_init_points, retained_best_params, bcm, output_folder)

# Plot optimised model fits on a same figure
retained_results = results.loc[:, pd.IndexSlice[results.columns.get_level_values(1).isin(retained_indices), :]]
retained_results = results.T.loc[:, :, retained_indices].T # double transpose to work with multi-index df rather than multi-level columns
plot_model_fits(retained_results, bcm, out_path / "optimal_fits.png")

# Early return if MCMC not requested
Expand Down

0 comments on commit 7a899be

Please sign in to comment.