Skip to content
Snippets Groups Projects

Expose positivity threshold in the runcard

Merged Emanuele Roberto Nocera requested to merge positivity_threshold_runcard into master

Created by: scarlehoff

This is the maximum value that the replica's positivity loss can have to get a POS_PASS tag in .fitinfo. By default it has the conservative 1e-6 value, but now it can be changed directly from the runcard as sometimes might not a good idea to be too strict. A comparison below:

I used as baseline the 130920-nnpdf40_jcm_iterated fit from Cameron, for which 66% of the replica passed. This was with a threshold of 1e-6.

I've launched a fit with 1e-4 and another one with 1e-3, the results are below:

For 1e-4, 74% of the replicas passed positivity

https://vp.nnpdf.science/VLGnw8h8SPOVI4HxJ0YaXA==/

For 1e-3, 90% of the replicas passed positivity.

https://vp.nnpdf.science/A1WNzi7oQNewiGzRDF3isA==/

Merge request reports

Merged by avatar (Apr 2, 2025 5:22pm UTC)

Merge details

  • Changes merged into with 207c2f13.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Emanuele Roberto Nocera
  • 66 66 positivity:
    67 67 multiplier: 1.05 # When any of the multiplier and/or the initial is not set
    68 68 initial: # the poslambda will be used instead to compute these values per dataset
    69 threshold: 1e-5
    • Created by: voisey

      Shouldn't this be set to the default?

    • Created by: scarlehoff

      The basic runcard is just an example of a runcard that works. When it is using defaults is accidental.

    • Created by: voisey

      Okay, sure. I just worried that someone might use this runcard as a template but not fiddle with parameters such as these, but rather just e.g. add the datasets they want to use, not appreciating that it uses non-default values for certain parameters. But I suppose someone's far more likely to use an existing fit runcard, which makes this fine

  • Emanuele Roberto Nocera
  • Emanuele Roberto Nocera
  • 100 117 if weight_freq < 0:
    101 raise CheckError(f"The frequency at which weights are saved must be greater than 0, received {weight_freq}")
    118 raise CheckError(
    119 f"The frequency at which weights are saved must be greater than 0, received {weight_freq}"
    120 )
    121
    122
    123 def check_lagrange_multipliers(parameters, key):
    124 """Checks the parameters in a lagrange multiplier dictionary
    125 are correct (positivity, integrability)"""
    126 lagrange_dict = parameters.get(key)
    127 if lagrange_dict is None:
    128 return
    129 multiplier = lagrange_dict.get("multiplier")
    130 if multiplier is not None and multiplier <= 0:
    131 log.warning("The %s multiplier is below 0, it will produce a negative loss", key)
  • Emanuele Roberto Nocera
  • Emanuele Roberto Nocera
  • Emanuele Roberto Nocera
  • Created by: voisey

    Review: Commented

    Looks good I think!

  • Created by: voisey

    Review: Approved

  • Merged by: scarlehoff at 2020-10-05 12:06:37 UTC

  • merged manually

  • Please register or sign in to reply
    Loading