SpatialPCA_SpatialPCs: Calculating Spatial PCs (latent factor matrix Z).

View source: R/SpatialPCA_SpatialPCs.R

SpatialPCA_SpatialPCsR Documentation

Calculating Spatial PCs (latent factor matrix Z).

Description

Calculating Spatial PCs (latent factor matrix Z).

Usage

SpatialPCA_SpatialPCs(object, fast = FALSE, eigenvecnum = NULL)

Arguments

object

SpatialPCA object.

fast

Select fast=TRUE if the user wants to use low-rank approximation on the kernel matrix to calculate the spatial PCs, otherwise select FALSE.

eigenvecnum

When fast=TRUE, eigenvecnum is the number of top eigenvectors and eigenvalues to be used in low-rank approximation in the eigen decomposition step for kernel matrix. The default is NULL, if specified, it is recommended that these top eigen values explain >=90% of the variance. In estimating spatial PCs, we need larger number of eigenvectors in kernel matrix for more accurate estimation.

Value

Returns SpatialPCA object with estimated Spatial PCs.


shangll123/SpatialPCA documentation built on April 17, 2024, 3:15 a.m.