Type: | Package |
Title: | Blind Source Separation for Multivariate Spatial Data using Eigen Analysis |
Version: | 0.1.0 |
Maintainer: | Sixing Hao <s.hao3@lse.ac.uk> |
Description: | Provides functions for blind source separation over multivariate spatial data, and useful statistics for evaluating performance of estimation on mixing matrix. 'BSSoverSpace' is based on an eigen analysis of a positive definite matrix defined in terms of multiple normalized spatial local covariance matrices, and thus can handle moderately high-dimensional random fields. This package is an implementation of the method described in Zhang, Hao and Yao (2022)<doi:10.48550/arXiv.2201.02023>. |
License: | GPL-3 |
Encoding: | UTF-8 |
Imports: | SpatialBSS, expm, rSPDE |
RoxygenNote: | 7.2.1 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2022-11-09 15:54:39 UTC; haosi |
Author: | Sixing Hao [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2022-11-10 18:50:05 UTC |
Blind Source Separation Over Space
Description
BSSS estimates the mixing matrix of blind source separation model for multivariate spatial data.
Usage
BSSS(x, coord, kernel_type, kernel_parameter, kernel_list = NULL)
Arguments
x |
A numeric matrix of dimension c(n, p), where the p columns correspond to the entries of the random field and the n rows are the observations. |
coord |
A numeric matrix of dimension c(n,2) where each row represents the coordinates of a point in the spatial domain. Only needed if the argument kernel_list is NULL. |
kernel_type |
A string indicating which kernel function to use. Either 'ring', 'ball' or 'gauss'. |
kernel_parameter |
A numeric vector that gives the parameters for the kernel function. At least length of one for 'ball' and 'gauss' or two for 'ring' kernel. |
kernel_list |
List of spatial kernel matrices with dimension c(n,n). Can be computed by the function |
Details
BSSS estimates the mixing matrix by combining the information of all local covariance matrices together and conduct eigenanalysis.
Value
BSSS returns a list, including the estimation of maxing matrix, the estimated latent field, and eigenvalues of matrix W for validating the estimation. Larger gaps among first few eigenvalues of matrix W strengthens the validity of estimation. See Zhang, Hao and Yao (2022) <arXiv:2201.02023> for details.
Examples
sample_size <- 500
coords <- runif(sample_size * 2) * 50
dim(coords) <- c(sample_size, 2)
dim <- 5 # specify the dimensionality of random variable
nu <- runif(dim, 0, 6) # parameter for matern covariance function
kappa <- runif(dim, 0, 2) # parameter for matern covariance function
zs <- gen_matern_gaussian_rf(coords=coords, dim=dim, nu=nu, kappa=kappa)
mix_mat <- diag(dim) # create a diagonal matrix as the mixing matrix
xs <- t(mix_mat %*% t(zs))
example <- BSSS(xs, coords, 'ring', c(0,0.5,0.5,1,1,8))
d_score(example$mix_mat_est, mix_mat)
d score
Description
d score measures the similarity of two square matrix with same dimension. d_score equals 0 if the estimator is a column permutation of true value.
Usage
d_score(estimator, true_value)
Arguments
estimator |
A square matrix, usually an estimator of the |
true_value |
A square matrix, which the estimator is compared to. |
Value
A numeric value in [0,1].
Examples
d_score(diag(3), diag(3))
Generating Gaussian random fields with Matern covariance function
Description
Generate Gaussian random fields with Matern covariance function
Usage
gen_matern_gaussian_rf(coords, dim, nu, kappa)
Arguments
coords |
coordinate of target randon field to be generated |
dim |
dimension of target randon field to be generated |
nu |
parameter of matern covariance function |
kappa |
parameter of matern covariance function |
Value
A data matrix with number of rows equal to 'coords', and number of columns equal to 'dim'.