tangle_score#
- tangles.analysis.tangle_score(tangle_matrix: ndarray, feat_ids: ndarray, feat_sys, normalize_rows=False, normalize_cols=False) ndarray #
Calculates the tangle scores, a measure of how much a point is ‘contained’ within a tangle.
It is calculated by considering, for every point and every tangle, every feature of the tangle and then calculating
number of features which contain the point - number of feature which do not contain the point.
Parameters#
- tangle_matrixnp.ndarray
A (tangles x features)-matrix encoding whether a tangle contains a certain feature or its inverse. Contains 1 if the tangle contains the feature and otherwise 0.
- feat_idsnp.ndarray
The feature ids corresponding to the columns of the tangle_matrix.
- feat_sysFeatureSystem
A feature system.
Returns#
- np.ndarray
A (points x tangles)-matrix encoding the tangle score of each point in the dataset for each tangle.