Skip to contents

Calculate weight matrix based on the Radial Basis Function (RBF) kernel.

Usage

calWeights(SpaCET_obj, radius = 200, k = NULL, sigma = 100, diagAsZero = TRUE)

Arguments

SpaCET_obj

A SpaCET object.

radius

Radius cut off (unit: um).

k

The maximum number of nearest neighbours to compute. The default value is all within radius.

sigma

Free parameter for RBF kernel.

diagAsZero

Indicate whether to mask the effect in the same spot.

Value

A SpaCET object

Examples

W <- calWeights(SpaCET_obj)