HCBE

HCBE.edgeType

edge

Edge of bipartite graph with star expansion of a hypergraph.

Arguments

  • from : Vertex number that the edge connects to. It is a number representing a vertex of the hypergraph.
  • to : Vertex number that the edge connects to. It is a number representing a hyperedge of the hypergraph.
  • weight : Edge weight.
  • id : The number of edges that this structure represents.
source
HCBE.edge_compMethod

edge_comp(a::edge, b::edge)

Edge comparison function. Sort in descending order of weight. If the weights are the same, they are compared according to the IDs of the edges.

source
HCBE.h2txtMethod

h2txt(h::Hypergraph, fname::AbstractString)

Translate hypergraph to text file. This is in the following form.

N M

N is number of hypergraph vertices. M is number of hypereedges.

source
HCBE.my_modMethod

my_mod(h::Hypergraph, part::Array{Set{any}})

Computes the modularity when h is divided by part.

source
HCBE.partitionFunction

partition(uf::UnionFind{Int}, to::Int=length(uf.parent), from::Int=1, )::Vector{Set{Int}}

Compute the clustering result from the disjoint set.

Arguments

  • uf : The disjoint set obtained by clustering.
  • to : Disjoint sets up to to are used. For example, if you want to get a vertex-only clustering result,

specify the number of vertices.

  • from : Use a disjoint set from from.
source
HCBE.s_HCBEMethod

sHCBE(h::Hypergraph, ncluster::Int=1, modularityf=modularity, weightf::Function=tfidf, freq::Int=Inf)

Clustering the vertices of the h using soft-Hypergraph Clustering based on Bipartite Expansion.

Arguments

  • h : Clustered hypergraph.
  • ncluster : When the number of clusters reaches `ncluster`, the clustering process is terminated.
  • modularity_f : Modularity function.
  • weighted_f : Bipartite graph edge weighting function.
  • freq : Once every freq times, the modularity is calculated.
source
HCBE.star_expansionFunction

starexpansion(h::Hypergraph, weightedf::Function=tfidf, param=Dict())

Star expandion h and construct a bipartite graph. Each edge is weighted by weighted_f.

source