DistanceMethods
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| chebyshev_distance | 1 | Chebyshev distance: py # \underset{i}{\max}{(|P_{i}\ -\ Q_{i}|)} np.max(np.abs(p - q)) |
| fidelity_distance | 1 | Fidelity distance: py # 1-\sum\sqrt{P_{i}Q_{i}} 1 - np.sum(np.sqrt(p * q)) |
| harmonic_mean_distance | 1 | Harmonic mean distance: py # 1-2\sum(\frac{P_{i}Q_{i}}{P_{i}+Q_{i}}) 1 - 2 * np.sum(p * q / (p + q)) |
| EuclideanDistance | 3 | |
| ManhattanDistance | 2 | Calculates the Manhattan Distance Measure between two data points |
| DistanceTo | 2 | implements via DistanceMethods.EuclideanDistance()) |
| SquareDistance | 4 | Reduced Euclidean distance |
| BrayCurtis | 1 | Bray-Curtis distance |
| MinkowskiDistance | 1 | |
| Mahalanobis | 1 | |
| Distance | 1 |
03 Members
Double(), Double())Chebyshev distance:
# \underset{i}{\max}{(|P_{i}\ -\ Q_{i}|)}
np.max(np.abs(p - q))| Name | Type | Description |
|---|---|---|
p | Double() | - |
q | Double() | - |
Double(), Double())Fidelity distance:
# 1-\sum\sqrt{P_{i}Q_{i}}
1 - np.sum(np.sqrt(p * q))| Name | Type | Description |
|---|---|---|
p | Double() | - |
q | Double() | - |
Double(), Double())Harmonic mean distance:
# 1-2\sum(\frac{P_{i}Q_{i}}{P_{i}+Q_{i}})
1 - 2 * np.sum(p * q / (p + q))| Name | Type | Description |
|---|---|---|
p | Double() | - |
q | Double() | - |
IEnumerable(Of Double))多位坐标的欧几里得距离,与坐标点0进行比较
| Name | Type | Description |
|---|---|---|
vector | IEnumerable(Of Double) | - |
Double(), Double())Calculates the Euclidean Distance Measure between two data points
| Name | Type | Description |
|---|---|---|
X | Double() | An array with the values of an object or datapoint |
Y | Double() | An array with the values of an object or datapoint |
Returns the Euclidean Distance Measure Between Points X and Points Y
Double(), Double())Calculates the Manhattan Distance Measure between two data points
Manhattan 距离:是Minkowski, q=1时的特例
| Name | Type | Description |
|---|---|---|
X | Double() | An array with the values of an object or datapoint |
Y | Double() | An array with the values of an object or datapoint |
Returns the Manhattan Distance Measure Between Points X and Points Y
Calculates the Manhattan Distance Measure between two data points
Manhattan 距离:是Minkowski, q=1时的特例
| Name | Type | Description |
|---|---|---|
X | IVector | An array with the values of an object or datapoint |
Y | IVector | An array with the values of an object or datapoint |
Returns the Manhattan Distance Measure Between Points X and Points Y
implements via DistanceMethods.EuclideanDistance()
Double())implements via DistanceMethods.EuclideanDistance()
| Name | Type | Description |
|---|---|---|
a | IVector | - |
v | Double() | - |
Double(), Double())SUM((a - v) ^ 2)
| Name | Type | Description |
|---|---|---|
v | Double() | - |
Double())SUM((a - v) ^ 2)
| Name | Type | Description |
|---|---|---|
a | IVector | - |
v | Double() | - |
Reduced Euclidean distance
SUM((x - y) ^ 2)
Reduced Euclidean distance
SUM((x - y) ^ 2)
Double(), Double())Bray-Curtis distance
| Name | Type | Description |
|---|---|---|
sample1 | Double() | - |
sample2 | Double() | - |
Double(), Double(), Double)Double(), Double(), Double(), Double)ValueTuple(Of Double, Double), Double, Double)