makeOffByOneAdjMat | R Documentation |
To use the Graph-Guided Fused Lasso penalty to only regularize the differences of coefficients of neighboring areas, suitable for time/spatial analysis. The adjacency matrix corresponding to the graph needs to be provided. The elements of this matrix are zero when two levels are not connected, and one when they are adjacent.
makeOffByOneAdjMat(nct)
nct |
the number of cell types/states |
If manually input the adjacency matrix, this matrix has to be symmetric and the names of the cell states should be given as row and column names.
sce <- makeSimulatedData() nct <- nlevels(sce$x) adjmatrix <- makeOffByOneAdjMat(nct) colnames(adjmatrix) <- rownames(adjmatrix) <- levels(sce$x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.