IMSL C# Numerical Library

Dissimilarities Constructor (Double[,], Int32, Int32, Int32)

Constructor for Dissimilarities.

public Dissimilarities(
   double[,] x,
   int distanceMethod,
   int distanceScale,
   int iRow
);

Parameters

x
A double matrix containing the data input matrix.
distanceMethod
An int identifying the method to use in computing the dissimilarities or similarities.
distanceScale
An int containing the scaling option.
iRow
An int identifying whether distances are computed between rows or columns of x.

Remarks

Acceptable values of distanceMethod are 1, 2, ..., 8. See Remarks section of the Dissimilarities documentation for a description of these methods.

distanceScale Method
0No scaling is performed.
1Scale each column (row if iRow=1) by the standard deviation of the column(row).
2Scale each column (row if iRow=1) by the range of the column (row).
If iRow = 1, distances are computed between the rows of x. Otherwise, distances between the columns of x are computed.

Exceptions

Exception Type Condition
ScaleFactorZeroException is thrown when computations cannot continue because a scale factor is zero.
NoPositiveVarianceException is thrown when no variable has positive variance
ZeroNormException is thrown when the Euclidean norm of a column is equal to zero

See Also

Dissimilarities Class | Imsl.Stat Namespace | Dissimilarities Constructor Overload List