calculateWeightedDistMatrix {Irescale} | R Documentation |
calculateWeightedDistMatrix
The weighted matrix is used as a standardized version of the distance matrix.
calculateWeightedDistMatrix(distM)
distM |
2D matrix with the distance among all pair of coordinates. |
Computes the similarity matrix of the distance by taking the reciprocal of the distance \frac{1}{d}
. A value of Zero is assigned when this value can not be calculated.
The whole reciprocal matrix is scaled by dividing each value by the sum of all the elements of the matrix.
weighted distance matrix. The sum of this matrix is 1.
fileInput <- system.file("testdata", "chen.csv", package="Irescale")
data<-loadFile(fileInput)
distM<-calculateEuclideanDistance(data$data)
distW<-calculateWeightedDistMatrix(distM)