NNPDF / nnpdf

An open-source machine learning framework for global analyses of parton distributions.
https://docs.nnpdf.science/
GNU General Public License v3.0
30 stars 6 forks source link

Query: turning off positivity entirely? #1595

Open LucianHL opened 2 years ago

LucianHL commented 2 years ago

I am interested in seeing what happens when all positivity requirements are turning off, however removing all reference to it in the input card seems to crash things, i.e. it seems to need at least one positivity dataset. I suspect there is a simple workaround that I am missing to achieve this though - thank you!

Zaharid commented 2 years ago

Does something like

diff --git a/n3fit/runcards/examples/Basic_runcard.yml b/n3fit/runcards/examples/Basic_runcard.yml
index 53159b8c8..4c03169f5 100644
--- a/n3fit/runcards/examples/Basic_runcard.yml
+++ b/n3fit/runcards/examples/Basic_runcard.yml
@@ -80,9 +80,7 @@ fitting:

 ############################################################
 positivity:
-  posdatasets:
-    - { dataset: POSF2U, maxlambda: 1e6 }  # Positivity Lagrange Multiplier
-    - { dataset: POSFLL, maxlambda: 1e4 }
+  posdatasets: []

work? I didn't get any obvious error running one replica.

LucianHL commented 2 years ago

Thank you - I think the '[]' is presumably the issue. I had tried just removing this entirely. I will have a go and let you know if it doesn't work.

scarlehoff commented 2 years ago

Hi @LucianHL thanks for the heads-up. Actually removing positivity completely should work, but the setupfit script has a check_positivity that should not activate at all when there is no positivity.

(i.e., it is a bug, as workarounds, what @Zaharid suggested probably works, or simply setting the maxlambda and initial positivity lambda to 0.0)

Zaharid commented 2 years ago

I think I'd rather call it a missing feature than a bug, but doesn't matter much either way. One problem with this is that reportengine doesn't really know about "missing namespaces" so it would need a bit of a hack to handle.