You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicator that X is a distance matrix, if not we compute a
69
76
distance matrix from X using the chosen metric.
77
+
70
78
metric: string or callable
71
79
The metric to use when calculating distance between instances in a feature array. If metric is a string, it must be one of the options specified in PAIRED_DISTANCES, including “euclidean”, “manhattan”, or “cosine”. Alternatively, if metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays from X as input and return a value indicating the distance between them.
"""Compute persistence diagrams for X data array and return the diagrams.
91
+
92
+
Parameters
93
+
----------
94
+
X: ndarray (n_samples, n_features)
95
+
A numpy array of either data or distance matrix.
96
+
97
+
distance_matrix: bool
98
+
Indicator that X is a distance matrix, if not we compute a
99
+
distance matrix from X using the chosen metric.
100
+
101
+
metric: string or callable
102
+
The metric to use when calculating distance between instances in a feature array. If metric is a string, it must be one of the options specified in PAIRED_DISTANCES, including “euclidean”, “manhattan”, or “cosine”. Alternatively, if metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays from X as input and return a value indicating the distance between them.
103
+
104
+
Return
105
+
------
106
+
dgms: list (size maxdim) of ndarray (n_pairs, 2)
107
+
A list of persistence diagrams, one for each dimension less than maxdim. Each diagram is an ndarray of size (n_pairs, 2) with the first column representing the birth time and the second column representing the death time of each pair.
0 commit comments