Returns the power distance between two data sets, using the current
values of parameters p and r.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public double GetDistance( DoubleVector data1, DoubleVector data2 ) |
| Visual Basic (Declaration) |
|---|
Public Function GetDistance ( _ data1 As DoubleVector, _ data2 As DoubleVector _ ) As Double |
| Visual C++ |
|---|
public: double GetDistance( DoubleVector^ data1, DoubleVector^ data2 ) |
Parameters
- data1
- Type: CenterSpace.NMath.Core..::.DoubleVector
The first data set.
- data2
- Type: CenterSpace.NMath.Core..::.DoubleVector
The second data set.
Return Value
The power distance between data1 and data2.
Remarks
The power distance is computed as:
CopyC#
Missing values are allowed. Pairs of elements are excluded from the
distance measure when their comparison returns NaN. If all pairs are
excluded, NaN is returned for the distance measure.
distance( x, y ) = ( |xi - yi|^p )^1/r
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.MismatchedSizeException | Thrown if the given data sets do not have equal lengths. |