Skip to content

Conversation

@scarlehoff
Copy link
Member

@scarlehoff scarlehoff commented Nov 11, 2025

Closes #2377

This PR deals with the clarity issues pointed out by #2377

  1. Allows the user to drop completely large-x from the runcard
  2. If feature scaling is enabled, the iterated runcard will have nothing for large x (instead of having something that is then ignored completely by the fit)
  3. Changes interpolation_points to feature_scaling_points so that it is clear when it is set to False or not set at all.

@kamillaurent @juanrojochacon let me know whether this is what you had in mind. This changes nothing on how the fit is run, right now the fit will just drop silently the large-x if feature scaling is set, now instead if you have large-x set it will refuse to run until you remove it.

@scarlehoff scarlehoff changed the title change interpolation_points to feature_scaling_points ; now the n… Make the usage of feature scaling + large x a bit clearer Nov 11, 2025
@juanrojochacon
Copy link

Looking at the PR description yes, this is what we need. @kamillaurent can take a look and then try to run a fit without and with FS, everything else kept the same, to check that things work properly.

I think it is useful that we can keep the two options for PDF parametrisation: for NNPDF4.1, probably we want to show in the paper the fit variants where everything is kept the same except for FS on or off

@scarlehoff scarlehoff force-pushed the make_feature_scaling_clearer branch from 47bd8d6 to 907dae5 Compare November 17, 2025 18:56
@scarlehoff
Copy link
Member Author

scarlehoff commented Dec 18, 2025

@kamillaurent have you looked into this? Otherwise I'll rather close it and keep the current conventions, because the more this drags the most things are going to be broken and the more work it is for me to keep it. This should be something quick and trivial to review.

…3fit checks are much more strict: no largex exponent is allowed when feature scaling is on, before they were silently dropped so no change of functionality is introduced by this PR, only change of checks ; vp-nextfitruncard automatically changes interpolation_points to feature_scaling_points and will drop largex if it is found together with feature_scaling_points
@scarlehoff scarlehoff force-pushed the make_feature_scaling_clearer branch from 907dae5 to 0b8aec9 Compare December 18, 2025 14:54
@kamillaurent
Copy link

Hi @scarlehoff , I am looking at it now. Sorry for the late reply, I will get back to you as soon as I finish

@kamillaurent
Copy link

kamillaurent commented Dec 19, 2025

@scarlehoff I tried to run the runcard in the branch make_feature_scaling_clearer. I then want to compare the fit to our baseline, 251124-jcm-nnpdf41-001, but I obtain this error by validphys:

  File "/data/theorie/klaurent/nnpdf/validphys2/src/validphys/eff_exponents.py", line 335, in previous_effective_exponents_table
    prev_b_bounds = [runcard_fl['largex'] for runcard_fl in fitting["basis"]]
                     ~~~~~~~~~~^^^^^^^^^^
KeyError: 'largex'

@scarlehoff
Copy link
Member Author

scarlehoff commented Dec 19, 2025

Hi @kamillaurent, by design I wanted to remove large-x from as many places as possible

now instead if you have large-x set it will refuse to run until you remove it.

and I would prefer if we do not mix both types of fits but I guess that ship has sailed anyway so the commit below puts the beta to NaN for the report if the fit has feature scaling on.

@kamillaurent
Copy link

Thanks for clarifying, the same error message appears also if I try to compare the fit done with feature scaling and the same fit iterated, I try now to do with the new commit:

  1. a comparison between the feature scaling fit and 251124-jcm-nnpdf41-001
  2. a comparison between the feature scaling fit and his iterated version\

Let me know if you have other checks to suggest

@scarlehoff
Copy link
Member Author

the same error message appears also if I try to compare the fit done with feature scaling and the same fit iterated,

That should not have happened instead!

Let me know if you have other checks to suggest

The important one is actually that you iterated the fit (so largex was dropped) and were able to run (so it was, indeed, dropped).

But this PR was also about making the feature scaling part clearer so that's the important part. If you think it is indeed clearer, then good, otherwise (if the previous version seem clearer) better to roll it back.

@kamillaurent
Copy link

kamillaurent commented Dec 20, 2025

The important one is actually that you iterated the fit (so largex was dropped) and were able to run (so it was, indeed, dropped).

Yes, the fit (and comparisons) now work using runcards without largex (both iterated fit and normal one), here are the reports:

  1. Test of a fit with this branch compared to baseline: https://vp.nnpdf.science/GiPUMdXHSwu8gjCeUFSjPQ==/
  2. Test of iterated fit: https://vp.nnpdf.science/ECbdZZvTSaKnnHF_D5LSWg==/

But this PR was also about making the feature scaling part clearer

I think it is clearer, because you specify in the runcard feature_scaling_points instead of interpolation_points

Copy link

@kamillaurent kamillaurent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fit (and comparisons) now work using runcards without largex (both iterated fit and normal one), here are the reports:

  1. Test of a fit with this branch compared to baseline: https://vp.nnpdf.science/GiPUMdXHSwu8gjCeUFSjPQ==/
  2. Test of iterated fit: https://vp.nnpdf.science/ECbdZZvTSaKnnHF_D5LSWg==/

In the runcard, what we do is clearer since we specify feature_scaling_points

@scarlehoff
Copy link
Member Author

Thanks! Then on Monda/Tuesday I'll merge both this and @jekoorn's PR so that the Christmas hyperopt is run already with this change.

Thank you very much for your work!

@scarlehoff scarlehoff merged commit 355b4f3 into master Dec 22, 2025
12 checks passed
@scarlehoff scarlehoff deleted the make_feature_scaling_clearer branch December 22, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature scaling in the run card

4 participants