The function getX is used to get the matrix of covariates for the regression based on a specified polynomial order.
getX(samples, derivatives, polyorder)The design matrix for the regression (except for the column of 1's for the intercept).
An \(N\) by \(d\) matrix of samples from the target
An \(N\) by \(d\) matrix of derivatives of the log target with respect to the parameters
The order of the polynomial.
Phi_fn for a very similar function for use in semi-exact control functionals. The function Phi_fn essentially gets the same matrix but with a column of ones added.