-
Notifications
You must be signed in to change notification settings - Fork 2
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
Analytic initialisation #41
Open
J-M-Moore
wants to merge
23
commits into
main
Choose a base branch
from
analytic_initialisation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7394fa2
Added option for initialising at analytic minimum of chi2 on experime…
d778266
Now analytic minimum is found on a per replica basis
39d4bbb
Cuts fixed in analytic initialisation
0457b09
Bug fix
feab618
Merge branch 'main' into analytic_initialisation
J-M-Moore faec530
Fixed indexing bug
6a03029
Merge branch 'analytic_initialisation' of github.com:LucaMantani/simu…
45f9a9a
Fixed cuts
f24a2e1
Fixed bug that does not use non-BSM sets
844f35e
Fixed analytic solution for sets that have a SIMU file, but are not i…
023db5b
Fixed analytic initialisation
5a17a5f
Small fix
5bc895e
For some reason, minval disappeared
f738259
For some reason, type disappeared
fbe432b
Small change to cuts... maybe needed?
dd20117
Another fix to the cuts maybe?
f41a845
Now prints the analytic solution even if not using analytic initialis…
543954f
Minor cuts fix
0bf251b
Minimum value of chi2 added
4cb6a4b
Automatic scale choice
400b3ca
Multiply by the scale, not divide
LucaMantani e5e369b
Fixed issues with floats
ecole41 3fd68e7
Reformatted with black
ecole41 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
189 changes: 189 additions & 0 deletions
189
n3fit/runcards/examples/simunet_examples/quick_check.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
#Configuration file for NNPDF++ | ||
# | ||
############################################################ | ||
description: "Test fit for the simunet release project. Oll scaled by 10.0, other operators by 1.0 and constant initialisation about 0.0 used." | ||
|
||
############################################################ | ||
# frac: training fraction | ||
# ewk: apply ewk k-factors | ||
# sys: systematics treatment (see systypes) | ||
|
||
dataset_inputs: | ||
# # EWPO | ||
- {dataset: LEP_ZDATA, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: LEP_BRW, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: LEP_BHABHA, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: ALPHAEW_WITHTHUNC, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
|
||
# # Diboson | ||
- {dataset: LEP_EEWW_182GEV, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: LEP_EEWW_189GEV, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: LEP_EEWW_198GEV, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: LEP_EEWW_206GEV, simu_fac: "EFT_LO", use_fixed_predictions: True} | ||
- {dataset: ATLAS_WW_13TEV_2016_MEMU, simu_fac: "EFT_NLO", use_fixed_predictions: True} | ||
- {dataset: ATLAS_WZ_13TEV_2016_MTWZ, simu_fac: "EFT_NLO", use_fixed_predictions: True} | ||
- {dataset: CMS_WZ_13TEV_2016_PTZ, simu_fac: "EFT_NLO", use_fixed_predictions: True} | ||
|
||
|
||
fixed_pdf_fit: True | ||
load_weights_from_fit: 221103-jmm-no_top_1000_iterated # If this is uncommented, training starts here. | ||
analytic_initialisation_pdf: 221103-jmm-no_top_1000_iterated | ||
use_th_covmat: False | ||
|
||
simu_parameters: | ||
# Dipoles | ||
# - {name: 'OtZ', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OtW', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OtG', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# Quark Currents | ||
# - {name: 'Opt', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O3pQ3', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
- {name: 'O3pq', scale: 1.0, initialisation: {type: analytic}} | ||
- {name: 'OpQM', scale: 1.0, initialisation: {type: analytic}} | ||
- {name: 'OpqMi', scale: 1.0, initialisation: {type: analytic}} | ||
- {name: 'Opui', scale: 1.0, initialisation: {type: analytic}} | ||
- {name: 'Opdi', scale: 1.0, initialisation: {type: analytic}} | ||
# Lepton currents | ||
- {name: 'O3pl', scale: 1.0, initialisation: {type: analytic}} | ||
- {name: 'Opl', scale: 1.0, initialisation: {type: analytic}} | ||
- {name: 'Ope', scale: 1.0, initialisation: {type: analytic}} | ||
# 4 Fermions 4Q | ||
# - {name: 'O1qd', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O1qu', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O1dt', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O1qt', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O1ut', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O11qq', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O13qq', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O8qd', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O8qu', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O8dt', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O8qt', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O8ut', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O81qq', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'O83qq', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# 4 Fermions 4HeavyQ | ||
# - {name: 'OQQ1', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OQQ8', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OQt1', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OQt8', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Ott1', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# 4 Fermions 2L2Q | ||
# - {name: 'Oeu', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Olu', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Oed', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Olq3', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Olq1', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Oqe', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Old', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# 4 Fermions 4L | ||
- {name: 'Oll', scale: 10.0, initialisation: {type: analytic}} | ||
# Yukawa | ||
# - {name: 'Omup', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Otap', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Otp', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Obp', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'Ocp', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# Bosonic | ||
# - {name: 'OG', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
- {name: 'OWWW', scale: 1.0, initialisation: {type: analytic}} | ||
# - {name: 'OpG', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OpW', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
# - {name: 'OpB', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
- {name: 'OpWB', scale: 1.0, initialisation: {type: analytic}} | ||
# - {name: 'Opd', scale: 0.01, initialisation: {type: uniform, minval: -1, maxval: 1}} | ||
- {name: 'OpD', scale: 1.0, initialisation: {type: analytic}} | ||
|
||
|
||
############################################################ | ||
datacuts: | ||
t0pdfset: 221103-jmm-no_top_1000_iterated # PDF set to generate t0 covmat | ||
q2min: 3.49 # Q2 minimum | ||
w2min: 12.5 # W2 minimum | ||
|
||
############################################################ | ||
theory: | ||
theoryid: 200 # database id | ||
|
||
############################################################ | ||
trvlseed: 475038818 | ||
nnseed: 2394641471 | ||
mcseed: 1831662593 | ||
save: "weights.h5" | ||
genrep: true # true = generate MC replicas, false = use real data | ||
|
||
############################################################ | ||
|
||
|
||
parameters: # This defines the parameter dictionary that is passed to the Model Trainer | ||
nodes_per_layer: [25, 20, 8] | ||
activation_per_layer: [tanh, tanh, linear] | ||
initializer: glorot_normal | ||
optimizer: | ||
clipnorm: 6.073e-6 | ||
learning_rate: 2.621e-3 | ||
optimizer_name: Nadam | ||
epochs: 30000 | ||
positivity: | ||
initial: 184.8 | ||
multiplier: | ||
integrability: | ||
initial: 184.8 | ||
multiplier: | ||
stopping_patience: 1.0 | ||
layer_type: dense | ||
dropout: 0.0 | ||
threshold_chi2: 3.5 | ||
|
||
fitting: | ||
# EVOL(QED) = sng=0,g=1,v=2,v3=3,v8=4,t3=5,t8=6,(pht=7) | ||
# EVOLS(QED)= sng=0,g=1,v=2,v8=4,t3=4,t8=5,ds=6,(pht=7) | ||
# FLVR(QED) = g=0, u=1, ubar=2, d=3, dbar=4, s=5, sbar=6, (pht=7) | ||
fitbasis: EVOL # EVOL (7), EVOLQED (8), etc. | ||
basis: | ||
- {fl: sng, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
1.093, 1.121], largex: [1.486, 3.287]} | ||
- {fl: g, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
0.8329, 1.071], largex: [3.084, 6.767]} | ||
- {fl: v, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
0.5202, 0.7431], largex: [1.556, 3.639]} | ||
- {fl: v3, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
0.1205, 0.4839], largex: [1.736, 3.622]} | ||
- {fl: v8, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
0.5864, 0.7987], largex: [1.559, 3.569]} | ||
- {fl: t3, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
-0.5019, 1.126], largex: [1.754, 3.479]} | ||
- {fl: t8, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
0.6305, 0.8806], largex: [1.544, 3.481]} | ||
- {fl: t15, pos: false, trainable: false, mutsize: [15], mutprob: [0.05], smallx: [ | ||
1.087, 1.139], largex: [1.48, 3.365]} | ||
|
||
############################################################ | ||
positivity: | ||
posdatasets: | ||
- {dataset: POSF2U, maxlambda: 1e6} # Positivity Lagrange Multiplier | ||
- {dataset: POSF2DW, maxlambda: 1e6} | ||
- {dataset: POSF2S, maxlambda: 1e6} | ||
- {dataset: POSFLL, maxlambda: 1e6} | ||
- {dataset: POSDYU, maxlambda: 1e10} | ||
- {dataset: POSDYD, maxlambda: 1e10} | ||
- {dataset: POSDYS, maxlambda: 1e10} | ||
- {dataset: POSF2C, maxlambda: 1e6} | ||
- {dataset: POSXUQ, maxlambda: 1e6} # Positivity of MSbar PDFs | ||
- {dataset: POSXUB, maxlambda: 1e6} | ||
- {dataset: POSXDQ, maxlambda: 1e6} | ||
- {dataset: POSXDB, maxlambda: 1e6} | ||
- {dataset: POSXSQ, maxlambda: 1e6} | ||
- {dataset: POSXSB, maxlambda: 1e6} | ||
- {dataset: POSXGL, maxlambda: 1e6} | ||
|
||
############################################################ | ||
integrability: | ||
integdatasets: | ||
- {dataset: INTEGXT8, maxlambda: 1e2} | ||
- {dataset: INTEGXT3, maxlambda: 1e2} | ||
|
||
############################################################ | ||
debug: false | ||
maxcores: 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why here there is the same if statement done twice, can't it all be done in one single if?