R/caesar_image.R
cellembedding_image_matrix.Rd
This function computes low-dimensional cell embeddings from a gene-by-cell matrix. The method initializes cell embeddings using approximate PCA and refines them through a linear factor model nested a intrinsical conditional autoregressive model.
cellembedding_image_matrix(
X,
adjm,
q = 50,
reduction.name = "caesar",
maxIter = 30,
epsELBO = 1e-06,
approx_Phi = FALSE,
verbose = TRUE,
Phi_diag = TRUE,
seed = 1
)
A gene-by-cell matrix (e.g., the `data` slot from a Seurat object) that serves as the input data for dimensional reduction.
A spatial adjacency matrix representing relationships between cells or spots.
An integer specifying the number of dimensions for the reduced embeddings. Default is 50.
A character string specifying the name of the dimensional reduction method. Default is 'caesar'.
Maximum number of iterations for the optimization algorithm. Default is 30.
A small number specifying the convergence threshold for the optimization algorithm. Default is 1e-6.
Logical, indicating whether to use the approximate method for Phi matrix estimation. Default is FALSE.
Logical, indicating whether to print progress messages. Default is TRUE.
Logical, indicating whether to constrain the Phi matrix to be diagonal. Default is TRUE.
An integer used to set the random seed for reproducibility. Default is 1.
A matrix containing the computed cell embeddings. The number of rows corresponds to the number of cells, and the number of columns corresponds to the specified number of dimensions (`q`).