Description Usage Arguments Value Examples

spectral_clustering

1 2 | ```
spectral_clustering(A, k, type = c("rw", "sym", "unnormalized"),
verbose = FALSE)
``` |

`A` |
affinity matrix |

`k` |
the number of clusters |

`type` |
choose one of three versions of graph Laplacian: "unnormalized": unnormalized graph Laplacian matrix (L = D - W); "rw": normalization closely related to random walk (L = I - D^(-1)*W); (default choice) "sym": normalized symmetric matrix (L = I - D^(-0.5) * W * D^(-0.5)) For more information: https://www.cs.cmu.edu/~aarti/Class/10701/readings/Luxburg06_TR.pdf |

`verbose` |
logical(1); if true, print user-friendly information |

a numeric vector as class labels

1 2 3 | ```
D = matrix(runif(400), nrow = 20)
A = affinity_matrix(D, 5)
labels = spectral_clustering(A, k=2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.