Skip to content

Commit 0e5cb4c

Browse files
authored
Merge pull request #2258 from NNPDF/nsigma_multiclosure_tpr_tnr
True Positive and Negative rates in multiclosure weighted fits
2 parents 3d653fd + c334bda commit 0e5cb4c

File tree

6 files changed

+742
-2
lines changed

6 files changed

+742
-2
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
meta:
2+
title: Inconsistency classification probabilities
3+
author: Lazy Person
4+
keywords: [nsigma, chi2, multiclosure test, inconsistent]
5+
6+
weighted_dataset: HERACOMBNCEP575
7+
8+
# NOTE: the commented fits are the ones needed to reproduce the plots in the paper.
9+
dataspecs:
10+
- speclabel: "DIS Inconsistent fits, weighted HERA 575"
11+
fits:
12+
- {id: 241227_dis_ict_lam0_weighted_hera575_fs_828872, label: "DIS weighted HERA 575, fs: 1"}
13+
- {id: 241227_dis_ict_lam0_weighted_hera575_fs_239494, label: "DIS weighted HERA 575, fs: 2"}
14+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_444227, label: "DIS weighted HERA 575, fs: 3"}
15+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_623856, label: "DIS weighted HERA 575, fs: 4"}
16+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_227492, label: "DIS weighted HERA 575, fs: 5"}
17+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_745924, label: "DIS weighted HERA 575, fs: 6"}
18+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_724387, label: "DIS weighted HERA 575, fs: 7"}
19+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_78994, label: "DIS weighted HERA 575, fs: 8"}
20+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_96000, label: "DIS weighted HERA 575, fs: 9"}
21+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_997788, label: "DIS weighted HERA 575, fs: 10"}
22+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_143862, label: "DIS weighted HERA 575, fs: 11"}
23+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_852153, label: "DIS weighted HERA 575, fs: 12"}
24+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_219029, label: "DIS weighted HERA 575, fs: 13"}
25+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_261213, label: "DIS weighted HERA 575, fs: 14"}
26+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_193336, label: "DIS weighted HERA 575, fs: 15"}
27+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_352812, label: "DIS weighted HERA 575, fs: 16"}
28+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_944815, label: "DIS weighted HERA 575, fs: 17"}
29+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_847399, label: "DIS weighted HERA 575, fs: 18"}
30+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_562031, label: "DIS weighted HERA 575, fs: 19"}
31+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_220528, label: "DIS weighted HERA 575, fs: 20"}
32+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_30137, label: "DIS weighted HERA 575, fs: 21"}
33+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_680245, label: "DIS weighted HERA 575, fs: 22"}
34+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_331227, label: "DIS weighted HERA 575, fs: 23"}
35+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_592002, label: "DIS weighted HERA 575, fs: 24"}
36+
# - {id: 241227_dis_ict_lam0_weighted_hera575_fs_955177, label: "DIS weighted HERA 575, fs: 25"}
37+
38+
39+
- speclabel: "DIS Inconsistent fits"
40+
fits:
41+
- {id: 8_6_2023_21_55_4_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_828872, label: "DIS lambda 0, fs: 1"}
42+
- {id: 8_6_2023_21_38_13_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_239494, label: "DIS lambda 0, fs: 2"}
43+
# - {id: 8_6_2023_21_41_39_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_444227, label: "DIS lambda 0, fs: 3"}
44+
# - {id: 8_6_2023_21_42_26_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_623856, label: "DIS lambda 0, fs: 4"}
45+
# - {id: 8_6_2023_21_43_13_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_227492, label: "DIS lambda 0, fs: 5"}
46+
# - {id: 8_6_2023_21_44_1_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_745924, label: "DIS lambda 0, fs: 6"}
47+
# - {id: 8_6_2023_21_44_50_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_724387, label: "DIS lambda 0, fs: 7"}
48+
# - {id: 8_6_2023_21_45_39_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_78994, label: "DIS lambda 0, fs: 8"}
49+
# - {id: 8_6_2023_21_46_26_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_96000, label: "DIS lambda 0, fs: 9"}
50+
# - {id: 8_6_2023_21_47_14_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_997788, label: "DIS lambda 0, fs: 10"}
51+
# - {id: 8_6_2023_21_48_55_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_143862, label: "DIS lambda 0, fs: 11"}
52+
# - {id: 8_6_2023_21_48_5_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_852153, label: "DIS lambda 0, fs: 12"}
53+
# - {id: 8_6_2023_21_49_44_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_219029, label: "DIS lambda 0, fs: 13"}
54+
# - {id: 8_6_2023_21_50_32_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_261213, label: "DIS lambda 0, fs: 14"}
55+
# - {id: 8_6_2023_21_51_23_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_193336, label: "DIS lambda 0, fs: 15"}
56+
# - {id: 8_6_2023_21_52_11_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_352812, label: "DIS lambda 0, fs: 16"}
57+
# - {id: 8_6_2023_21_53_47_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_944815, label: "DIS lambda 0, fs: 17"}
58+
# - {id: 8_6_2023_21_56_2_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_847399, label: "DIS lambda 0, fs: 18"}
59+
# - {id: 8_6_2023_21_56_52_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_562031, label: "DIS lambda 0, fs: 19"}
60+
# - {id: 8_6_2023_21_57_55_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_220528, label: "DIS lambda 0, fs: 20"}
61+
# - {id: 8_6_2023_21_59_2_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_30137, label: "DIS lambda 0, fs: 21"}
62+
# - {id: 8_6_2023_22_0_10_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_680245, label: "DIS lambda 0, fs: 22"}
63+
# - {id: 8_6_2023_22_1_12_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_331227, label: "DIS lambda 0, fs: 23"}
64+
# - {id: 8_6_2023_22_2_12_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_592002, label: "DIS lambda 0, fs: 24"}
65+
# - {id: 8_6_2023_22_3_6_mnc_dis_pt1_type2_inconsistent_HERANC_commit_a6f0b1539_filterseed_955177, label: "DIS lambda 0, fs: 25"}
66+
67+
# - speclabel: "DIS Inconsistent fits, weighted NMC"
68+
# fits:
69+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_828872, label: "DIS weighted NMC, fs 1"}
70+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_239494, label: "DIS weighted NMC, fs 2"}
71+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_444227, label: "DIS weighted NMC, fs 3"}
72+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_623856, label: "DIS weighted NMC, fs 4"}
73+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_227492, label: "DIS weighted NMC, fs 5"}
74+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_745924, label: "DIS weighted NMC, fs 6"}
75+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_724387, label: "DIS weighted NMC, fs 7"}
76+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_78994, label: "DIS weighted NMC, fs 8"}
77+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_96000, label: "DIS weighted NMC, fs 9"}
78+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_997788, label: "DIS weighted NMC, fs 10"}
79+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_143862, label: "DIS weighted NMC, fs 11"}
80+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_852153, label: "DIS weighted NMC, fs 12"}
81+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_219029, label: "DIS weighted NMC, fs 13"}
82+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_261213, label: "DIS weighted NMC, fs 14"}
83+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_193336, label: "DIS weighted NMC, fs 15"}
84+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_352812, label: "DIS weighted NMC, fs 16"}
85+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_944815, label: "DIS weighted NMC, fs 17"}
86+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_847399, label: "DIS weighted NMC, fs 18"}
87+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_562031, label: "DIS weighted NMC, fs 19"}
88+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_220528, label: "DIS weighted NMC, fs 20"}
89+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_30137, label: "DIS weighted NMC, fs 21"}
90+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_680245, label: "DIS weighted NMC, fs 22"}
91+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_331227, label: "DIS weighted NMC, fs 23"}
92+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_592002, label: "DIS weighted NMC, fs 24"}
93+
# - {id: 241227_dis_ict_lam0_weighted_NMC_fs_955177, label: "DIS weighted NMC, fs 25"}
94+
95+
use_cuts: internal
96+
use_fitcommondata: true
97+
use_weights_in_covmat: false
98+
99+
template_text: |
100+
## Probabilities
101+
102+
#### All sets Probabilities
103+
{@plot_all_sets@}
104+
105+
{@plot_1_minus_all_sets@}
106+
107+
#### Prob of being inconsistent
108+
{@plot_probability_inconsistent@}
109+
110+
#### Prob of being consistent
111+
{@plot_probability_consistent@}
112+
113+
114+
actions_:
115+
- report(main=True)

validphys2/src/validphys/closuretest/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,35 @@
1313
from validphys.closuretest.multiclosure_preprocessing import *
1414
from validphys.closuretest.multiclosure_pseudodata import *
1515
from validphys.closuretest.inconsistent_closuretest.multiclosure_inconsistent_output import *
16+
# TODO:
17+
# select the functions to be exposed from the previous modules
18+
# and make sure they are flagged smh as closure_test providers
19+
from validphys.closuretest.multiclosure_nsigma_helpers import (
20+
central_member_chi2,
21+
chi2_nsigma_deviation,
22+
datasets_chi2_nsigma_deviation,
23+
fits_datasets_chi2_nsigma_deviation,
24+
fits_data,
25+
is_weighted,
26+
n_fits,
27+
)
28+
from validphys.closuretest.multiclosure_nsigma import (
29+
multiclosurefits_nsigma,
30+
dataspecs_multiclosurefits_nsigma,
31+
comp_nsigma_alpha,
32+
dataspecs_comp_nsigma_alpha,
33+
set_1,
34+
set_2,
35+
comp_set_1,
36+
set_3,
37+
probability_inconsistent,
38+
dataspecs_nsigma_alpha,
39+
nsigma_alpha,
40+
multiclosurefits_nsigma,
41+
)
42+
from validphys.closuretest.multiclosure_nsigma_output import (
43+
plot_all_sets,
44+
plot_1_minus_all_sets,
45+
plot_probability_inconsistent,
46+
plot_probability_consistent,
47+
)

0 commit comments

Comments
 (0)