calculateWeightedDistMatrix {Irescale}R Documentation

Calculates a weighted representation of the distance matrix.

Description

calculateWeightedDistMatrix The weighted matrix is used as a standardized version of the distance matrix.

Usage

calculateWeightedDistMatrix(distM)

Arguments

distM

2D matrix with the distance among all pair of coordinates.

Details

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.

Value

weighted distance matrix. The sum of this matrix is 1.

Examples

fileInput <- system.file("testdata", "chen.csv", package="Irescale")
data<-loadFile(fileInput)
distM<-calculateEuclideanDistance(data$data)
distW<-calculateWeightedDistMatrix(distM)

[Package Irescale version 2.3.0 Index]