Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix table chi2 grouped by #2070

Merged
merged 2 commits into from
May 8, 2024
Merged

fix table chi2 grouped by #2070

merged 2 commits into from
May 8, 2024

Conversation

scarlehoff
Copy link
Member

When using the function groups_chi2_table, the group information is being dropped. The list of chi2 is indeed grouped by the group you are interested in but the dataset is saved as the group key and the total-per-group is not being used.

This is a fix to #1532 (which uses this function and which was the original bug)

Before:

        central_mean    npoints chi2_per_data   perreplica_mean perreplica_std  group
0       105.6      121     0.87      109.29      3.14      NMC_NC_NOTFIXED_DW_EM-F2
1       320.0      204     1.56      323.24      12.31     NMC_NC_NOTFIXED_P_EM-SIGMARED
2       30.12      33      0.91      31.253      4.01      SLAC_NC_NOTFIXED_P_DW_EM-F2
3       20.74      34      0.61      22.02       2.583     SLAC_NC_NOTFIXED_D_DW_EM-F2
4       465.1      333     1.39      474.0       19.4      BCDMS_NC_NOTFIXED_P_DW_EM-F2

Now:

        central_mean    npoints chi2_per_data   perreplica_mean perreplica_std  dataset group
0       105.679      121     0.87      109.26      3.14     NMC_NC_NOTFIXED_DW_EM-F2        DIS NC
1       320.00       204     1.56      323.24      12.3     NMC_NC_NOTFIXED_P_EM-SIGMARED   DIS NC
2       30.122       33      0.91      31.25      4.012    SLAC_NC_NOTFIXED_P_DW_EM-F2     DIS NC
3       20.740       34      0.61      22.04       2.58     SLAC_NC_NOTFIXED_D_DW_EM-F2     DIS NC
4       465.127      333     1.39      474.08       19.      BCDMS_NC_NOTFIXED_P_DW_EM-F2    DIS NC
5       945.59       725     1.30      963.74       23.                                      DIS NC

@scarlehoff scarlehoff added the bug Something isn't working label May 7, 2024
Co-authored-by: Roy Stegeman <roystegeman@live.nl>
@scarlehoff scarlehoff merged commit 1334776 into master May 8, 2024
6 checks passed
@scarlehoff scarlehoff deleted the fix_groups_results branch May 8, 2024 17:41
@scarlehoff scarlehoff mentioned this pull request May 20, 2024
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants