Closed LucaMantani closed 11 months ago
Hi @LucaMantani, this seems doable we can add an option. Do I understand correctly that the best fit solutions, will be the mean on all the datapoints of this matrix?
np.inv(X.T @ Sigma @ X) @ X.T @ Sigma @ Y
Hi @giacomomagni , yes, the best fit solution will be the mean of the gaussian.
I think it would be nice to have an analytic solution module to solve the linear problem. This could be realised in the following way:
chi2 = (D - T_SM - X c). Sigma.(D - T_SM - X c) = (Y - X c).Sigma.(Y - X c)
D = data (array) T_SM = SM_best (array) X = matrix of EFT predictions (n_data, n_coeffs) c = array of wilson coefficients Sigma = inverse cov mat Y = D- T_SM
The posterior is a gaussian, with parameters:
Then we could generate posterior samples with:
This way we can interface the output of the module to the same identical routines of NS and we don't have to reinvent the wheel.