add final covmat regularisation procedure and a stat estimator table#630
Conversation
updated function to regularize full covmat, updated kwarg to reflect that the norm of the matrix has threshold not the condition number.
… the expected std dev of chi2
|
The purpose of this was to have stable versions of the functions which regularize the covmats/sqrtcovmats on master and also some of the tables for the paper can perhaps be generated with validphys more efficiently than in a notebook. |
|
example of two tables added: https://vp.nnpdf.science/EJsoHwoDQeyfWe0l3bAW6g== |
|
I have a couple of questions regarding the interface. I have the feeling that it is better the way it is done already though. Now we have an opt in boolean flag that enables the regularization and additionally a threshold number. Could we have instead threshold=Optional[Number] with the meaning that there is no regularization if it is None? Also would it make sense if the regularized covmat is some sort of explicit node instead of piling up functionality on top of the function we have? My intuition is no because we don't have some diverging dependencies for the normal and regularized mat (and you would still have to call it anyway). More importantly how would this interact with the fit? Ideally there should be an easy way (for n3fit at least) to do fits with regularized covmats and to get the regularization from fit somehow. Possibly by adding the setting to the various |
… improved column construction of dataspecs_datasets_covmat_differences_table
This seems sensible, changed to reflect this
I've never really looked at the explicit node stuff, I think the way it's currently done seems fine - like you say the normal and regularized covmats are used in the same way
hmm more complicated because what this PR does not do yet is the correct regularization on experiment covmats, since we really need to commondata file to do that it was more for the dataset chi2s. I suspect this feature will be easier to do with the experiment API, because we can regularize the sqrt cov with regularize_l2 function before any 'group of datasets' covmat is constructed - if at all. |
|
hopefully tests pass then this closes #584 |
…eg flag which did nothing
0244a01 to
f4a1a3e
Compare
|
Cool. |
added the final recommendation for covmat reg to calcutils, added functions which regularize both covmat and sqrt of covmat (lower triangle/systematics file)
Also added a preliminary table for comparing the affect of different thresholds on the difference between the chi2 and the expected chi2 in units of the standard deviation of the chi2.
To do:
closes #584