run_laplace_embedding: Run Laplace embedding

View source: R/spectral.R

run_laplace_embeddingR Documentation

Run Laplace embedding

Description

Run Laplace embedding on a symmetric (weighted) adjacency matrix with a specified number of eigenvalues and eigenvectors.

Usage

run_laplace_embedding(adj_mat, num_eigs, type_lap = c("comb", "rw"))

Arguments

adj_mat

Symmetric adjacency matrix to be embedded.

num_eigs

Number of eigenvalues and eigenvectors for the embedding.

type_lap

Type of Laplacian for the embedding. One of "comb" (combinatorial) or "rw" (random-walk).

Value

A list with two entries: vals contains the length-num_eigs vector of the first few eigenvalues of the Laplacian, and vects contains an nrow(adj_mat) by num_eigs matrix of the associated eigenvectors.

Examples

adj_mat <- matrix(c(1:9), nrow = 3)
run_laplace_embedding(adj_mat, 2, "rw")

motifcluster documentation built on Nov. 18, 2022, 9:06 a.m.