Description Usage Arguments Value References Examples
This function takes inferential results from Infer
and computes the predictive variance from the posterior GMRF at locations for a very large number of data points. This function only yields valid results if the non-zero locations in each row of the incidence matrix constructed using the validation data are a subset of those used to generate the posterior precision matrix, see references.
1 2 3 4 5 6 7 | pred_variance_large(Results, G)
## S4 method for signature 'list,Graph_2nodes'
pred_variance_large(Results, G)
## S4 method for signature 'matrix,Graph_2nodes'
pred_variance_large(Results, G)
|
Results |
a list generated by the function |
G |
An object of class |
Object of class Obs
.
Jonathan C. Rougier, Andrew Zammit-Mangion and Nana Schoen (2014). Computation and visualisation for large-scale Gaussian updates. http://arxiv.org/abs/1406.5005.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
require(Matrix)
data(icesat)
data(surf_fe)
## First create observation object
icesat_obs <- Obs(df=icesat,
abs_lim = 5,
avr_method = "median",
box_size=100,
name="icesat")
## Now create GMRF defined over some FE basis
Mesh <- initFEbasis(p=surf_fe$p,
t=surf_fe$t,
M=surf_fe$M,
K=surf_fe$K)
mu <- matrix(0,nrow(Mesh),1)
Q <- sparseMatrix(i=1:nrow(surf_fe$p), j = 1:nrow(surf_fe$p), x = 1)
my_GMRF <- GMRF(mu = mu, Q = Q,name="SURF",t_axis = 0:6)
SURF <-GMRF_basis(G = my_GMRF, Basis = Mesh)
L1 <- link(SURF,icesat_obs)
e <- link_list(list(L1))
v <- block_list(list(O = icesat_obs, G = SURF))
G <- new("Graph",e=e,v=v)
G_reduced <- compress(G)
Results <- Infer(G_reduced)
Obs_test <- pred_variance_large(Results,G_reduced)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.