@@ -865,34 +865,34 @@ def sample_group(group, n=subsample_size): # type: ignore # noqa: ANN001, PGH0
865865 )
866866 all_statistics .append (statistics )
867867
868- df = pd .json_normalize (all_statistics , max_level = 1 ) # type: ignore # noqa: PD901, PGH003
869- df .head () # type: ignore # noqa: PGH003
868+ statistics_df = pd .json_normalize (all_statistics , max_level = 1 ) # type: ignore # noqa: PGH003
869+ statistics_df .head () # type: ignore # noqa: PGH003
870870
871871 # %% Get the statistic for each group.
872872 # fmt: off
873873 # do the statistics for the different tests
874874 # Ground truth
875- print ("best_guess_z: " ,df ["ground_truth.best_guess_z" ].abs ().max ())
875+ print ("best_guess_z: " ,statistics_df ["ground_truth.best_guess_z" ].abs ().max ())
876876
877877 # %%
878878 # qoi_no_gp
879- print ("best_guess_z: " ,df ["qoi_no_gp.best_guess_z" ].abs ().max ())
879+ print ("best_guess_z: " ,statistics_df ["qoi_no_gp.best_guess_z" ].abs ().max ())
880880
881- print ("best_guess_std\n " ,(df ["qoi_no_gp.best_guess_std" ] / df ["ground_truth.best_guess_std" ]).agg (["min" ,"max" ]))
882- print ("var_mean\n " ,(df ["qoi_no_gp.var_mean" ] / df ["ground_truth.var_mean" ]).agg (["min" ,"max" ]))
883- print ("var_std\n " ,(df ["qoi_no_gp.var_std" ] / df ["ground_truth.var_std" ]).agg (["min" ,"max" ]))
881+ print ("best_guess_std\n " ,(statistics_df ["qoi_no_gp.best_guess_std" ] / statistics_df ["ground_truth.best_guess_std" ]).agg (["min" ,"max" ]))# noqa: E501
882+ print ("var_mean\n " ,(statistics_df ["qoi_no_gp.var_mean" ] / statistics_df ["ground_truth.var_mean" ]).agg (["min" ,"max" ]))# noqa: E501
883+ print ("var_std\n " ,(statistics_df ["qoi_no_gp.var_std" ] / statistics_df ["ground_truth.var_std" ]).agg (["min" ,"max" ]))
884884
885885
886886 # %% qoi_gp_deterministic
887- print ("best_guess_z: " , df ["qoi_gp_deterministic.best_guess_z" ].abs ().max ())
887+ print ("best_guess_z: " , statistics_df ["qoi_gp_deterministic.best_guess_z" ].abs ().max ())
888888
889889
890890 # %% qoi_gp_low_uncertainty
891- print ("best_guess_z: " , df ["qoi_gp_low_uncertainty.best_guess_z" ].abs ().max ())
891+ print ("best_guess_z: " , statistics_df ["qoi_gp_low_uncertainty.best_guess_z" ].abs ().max ())
892892
893- print ("best_guess_std\n " ,(df ["qoi_gp_low_uncertainty.best_guess_std" ] / df ["ground_truth.best_guess_std" ]).agg (["min" ,"max" ])) # noqa: E501
894- print ("var_mean\n " ,(df ["qoi_gp_low_uncertainty.var_mean" ] / df ["ground_truth.var_mean" ]).agg (["min" ,"max" ]))
895- print ("var_std\n " ,(df ["qoi_gp_low_uncertainty.var_std" ] / df ["ground_truth.var_std" ]).agg (["min" ,"max" ]))
893+ print ("best_guess_std\n " ,(statistics_df ["qoi_gp_low_uncertainty.best_guess_std" ] / statistics_df ["ground_truth.best_guess_std" ]).agg (["min" ,"max" ])) # noqa: E501
894+ print ("var_mean\n " ,(statistics_df ["qoi_gp_low_uncertainty.var_mean" ] / statistics_df ["ground_truth.var_mean" ]).agg (["min" ,"max" ]))# noqa: E501
895+ print ("var_std\n " ,(statistics_df ["qoi_gp_low_uncertainty.var_std" ] / statistics_df ["ground_truth.var_std" ]).agg (["min" ,"max" ]))# noqa: E501
896896
897897 # fmt:on
898898 # %%
0 commit comments