ash_model.utils.projections.clique_projection

ash_model.utils.projections.clique_projection(h, start=None, end=None, keep_attrs=False)[source]

Returns a NetworkX Graph object that is the clique projection of the given ASH object. The clique projection of a hypergraph is a graph constructed by placing an edge between every pair of nodes that belong to the same hyperedge.

Parameters:
  • h (ASH) – The ASH object to be projected.

  • start (int | None) – The start time of the projection (optional).

  • end (int | None) – The end time of the projection (optional).

  • keep_attrs (bool) – If True, the attributes of the nodes in the ASH will be preserved in the resulting NetworkX graph.

Returns:

A NetworkX Graph object representing the clique projection of the ASH.

Return type:

Graph