Module: cluster
In this module are all the functions to identify clusters in a given contact map or evaluate data if clustering makes sense (Hopkins statistic). A cluster is a set of contacts which are directly or indirectly (chain of direct contacts) connected.
Members
- BioHelpers_FABER.cluster.findCluster(x: ndarray) list
Identifying all clusters.
- Parameters:
x (np.array) – contact map
- Returns:
list of clusters [cluster1, cluster2, …] where clusterX of the form [[x1,y1],[x2,y2],…]
- Return type:
list
- BioHelpers_FABER.cluster.hopkins(X: ndarray, subsample: float = 0.1, seed: int = 247) float
Hopkins Function
- Parameters:
X (np.ndarray) – Datapoints with dimension (n,d)
subsample (float, optional) – Fraction of subsample, defaults to 0.1
seed (int, optional) – Seed for reproducibility, defaults to 247
- Returns:
Hopkins Value
- Return type:
float