kernel_build_sparse: Build sparse kernel matrix.

View source: R/SpatialPCA_buildKernel.R

kernel_build_sparseR Documentation

Build sparse kernel matrix.

Description

This function calculates kernel matrix.

Usage

kernel_build_sparse(kerneltype, location, bandwidth, tol, ncores)

Arguments

kerneltype

The type of kernel to be used, either "gaussian", or "cauchy" for cauchy kernel, or "quadratic" for rational quadratic kernel.

location

A n by d matrix of cell/spot location coordinates.

bandwidth

A numeric value of bandwidth.

tol

A numeric value of cut-off value when building sparse kernel matrix.

ncores

A integer value of number of CPU cores to use when building sparse kernel matrix.

Value

The sparse kernel matrix for spatial relationship between locations.


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