snf.metrics.rank_feature_by_nmi¶
-
snf.metrics.
rank_feature_by_nmi
(inputs, W, *, K=20, mu=0.5, n_clusters=None)[source]¶ Calculates NMI of each feature in inputs with W
Parameters: - inputs (list-of-tuple) – Each tuple should contain (1) an (N, M) data array, where N is samples
M is features, and (2) a string indicating the metric to use to compute
a distance matrix for the given data. This MUST be one of the options
available in
scipy.spatial.distance.cdist()
- W ((N, N) array_like) – Similarity array generated by
snf.compute.snf()
- K ((0, N) int, optional) – Hyperparameter normalization factor for scaling. Default: 20
- mu ((0, 1) float, optional) – Hyperparameter normalization factor for scaling. Default: 0.5
- n_clusters (int, optional) – Number of desired clusters. Default: determined by eigengap (see snf.get_n_clusters())
Returns: nmi – Normalized mutual information scores for each feature of input arrays
Return type: list of (M,) np.ndarray
- inputs (list-of-tuple) – Each tuple should contain (1) an (N, M) data array, where N is samples
M is features, and (2) a string indicating the metric to use to compute
a distance matrix for the given data. This MUST be one of the options
available in