Skip to contents

Visualize the results of hypergraph spectral clustering.

Usage

# S3 method for class 'psychHypergraphClustering'
plot(x, type = "both", ...)

Arguments

x

A psychHypergraphClustering object.

type

Type of visualization.

"eigenvalues"

Plot Laplacian eigenvalues.

"clusters"

Plot spectral embedding colored by cluster.

"both"

Produce both plots.

...

Additional arguments.

Value

If type = "eigenvalues", returns a ggplot object.

If type = "clusters", returns a ggplot object.

If type = "both", returns a list containing both plots.

Details

The function can display:

  • Laplacian eigenvalues

  • Spectral embedding colored by cluster membership

  • Both visualizations

The eigenvalue plot can be used to inspect the spectral structure of the hypergraph.

The embedding plot shows node positions in the low-dimensional spectral space obtained from the first non-trivial eigenvectors of the Laplacian.

Nodes assigned to the same cluster should appear close together in the embedding space.

Examples

if (FALSE) { # \dontrun{

cl <- spectral_clustering(hg, K = 3)

plot(cl)

plot(cl, type = "eigenvalues")

plot(cl, type = "clusters")

} # }