Skip to content

[Speculative] Modifications used for reweighting

Emanuele Roberto Nocera requested to merge covmat_mods into master

Created by: nhartland

A bit of a speculative P.R this one, it contains the modifications I made to quickly get a reweighting exercise up and running using external predictions.

There are three modifications

  1. The addition of an 'empty' ThPredictions which can be filled manually.
ThPredictions::ThPredictions(std::string pdfname, std::string setname, int nPDF, int nDat, PDFSet::erType erty): 
  1. The extraction of the covariance matrix generation from DataSet into a separate function
  matrix<double> ComputeCovMat(CommonData const& cd, std::vector<double> const& t0)  
  1. Changing the computation of N_{effective exponents} in the vp2 reweighting code:
-    return np.exp(np.nansum(w*np.log(N/w))/N)
+    return np.exp(np.nansum(w*np.log(N)-w*np.log(w))/N)

Which handles w=0 a little better.

Point (2) being the more controversial one, it being a kind of half-assed solution to #21 (closed). This is probably not in any state to be merged right now, but might form a basis to actually getting a better solution to #21 (closed). The important thing being that here DataSet and Experiment have their covariance matrices being handled rather asymmetrically.

(Also, apologies for borking up the rebase, now there are a bunch of superfluous commits, this'll have to be a squash merge if it ever does get merged).

Merge request reports

Loading