Description Usage Arguments Value Author(s) Examples
View source: R/SpatCorrImage.R
This function estimate the rho parameter in the exponetial squared covariance kernel exp(-rho*||x - x'||^2)
1 | minimum_contrast_images(X, coords)
|
X |
a matrix format of multiple images, where rows are different images in vector format. |
coords |
voxel locations of images: each raw has the (x,y) coordinates for 2D images or (x, y, z) coordinates for 3D images. |
the rho value
Jian Kang <jiankang@umich.edu>
1 2 3 4 5 6 7 8 9 10 11 | n = 10
coords = expand.grid(seq(-1,1,length=n),seq(-1,1,length=n))
rho0 = 0.5
dist_coords = dist(coords)
Sigma = exp(-rho0*as.matrix(dist_coords^1.99))
R <- chol(Sigma)
m = nrow(coords)
N = 20
X <- t(crossprod(R,matrix(rnorm(m*N),nrow=m,ncol=N)))
image(matrix(X[1,],n,n))
minimum_contrast_images(X,coords)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.