powered by
Draws n i.i.d. N(0, I_m) latent factors, applies g component-wise, and checks whether |E[g(x)]| < tol on every coordinate.
verify_mean(g_fun, m = 5, n = 10000, tol = 0.001)
logical TRUE if |mean| < tol on all coords
vectorised map g: R -> R
latent dimension
Monte-Carlo sample size
numerical tolerance (default 1e-3)
tmp <- g_fun("weak_nonlinear") verify_mean(tmp$g_fun, m = 5)
Run the code above in your browser using DataLab