You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on the HSGP tutorial with @bwengals, we discovered out-of-sample predictions are wrong when the range of the X domain changes, because L, the parameter on the boundary condition is computed again the new values of X... but shouldn't.
I'll fix that in a PR coming very soon. I'll also make sure the mean-centering of data, necessary to compute L, is done under the hood, instead of requiring the user to do it -- which is the current API but is a sneaky source of error
Reproduceable code example:
x=np.linspace(-5, 5, 100)
withpm.Model() asmodel:
# Set mutable dataX=pm.MutableData("X", x[:, None])
m= [5]
c=5.0X_mu=np.mean(x, axis=0)
Xs=X-X_mu### WITH EVAL, NO BUG. WITHOUT EVAL, BUGL=pm.gp.hsgp_approx.set_boundary(Xs, c).eval()
eigvals=pm.gp.hsgp_approx.calc_eigenvalues(L, m, tl=pt)
phi=pm.gp.hsgp_approx.calc_eigenvectors(Xs, L, eigvals, m, tl=pt)
phi1=phi.eval()
x_new=np.linspace(-5, 10, 200)
withmodel:
pm.set_data({"X": x_new[:, None]})
plt.plot(x, phi1, 'k');
plt.plot(x_new, phi.eval(), 'b', alpha=0.5);
Error message:
No response
PyMC version information:
5.12.0
Context for the issue:
No response
The text was updated successfully, but these errors were encountered:
Describe the issue:
While working on the HSGP tutorial with @bwengals, we discovered out-of-sample predictions are wrong when the range of the X domain changes, because
L
, the parameter on the boundary condition is computed again the new values of X... but shouldn't.I'll fix that in a PR coming very soon. I'll also make sure the mean-centering of data, necessary to compute
L
, is done under the hood, instead of requiring the user to do it -- which is the current API but is a sneaky source of errorReproduceable code example:
Error message:
No response
PyMC version information:
5.12.0
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: