๐งโ๐คโ๐ง Hy-SCยถ
Submodulesยถ
hypergraphx.communities.hy_sc.model moduleยถ
- class hypergraphx.communities.hy_sc.model.HySC(seed=0, inf=1e+40, n_realizations=10, out_inference=False, out_folder='../data/output/', end_file='_sc.dat')[source]ยถ
Bases:
objectImplementation of Hypergraph Spectral Clustering from โLearning with hypergraphs: Clustering, classification, and embeddingโ, Zhou D., Huang J., Schรถlkopf B.
- apply_kmeans(X, seed=10)[source]ยถ
Apply K-means algorithm to the eigenvectors of the Laplacian matrix.
- Parameters:
X (matrix with eigenvectors.)
seed (random seed.)
- Returns:
X_pred
- Return type:
membership matrix.
- fit(hypergraph, K, weighted_L=False)[source]ยถ
Perform community detection on hypergraphs with spectral clustering.
- Parameters:
hypergraph (the hypergraph to perform inference on.)
K (number of communities.)
weighted_L (flag to use the weighted Laplacian.)
- Returns:
u
- Return type:
hard-membership matrix of dimension (N, K).