calculateWeightedDistMatrix: Calculates a weighted representation of the distance matrix.

Description Usage Arguments Details Value Examples

View source: R/rectifiedI.R

Description

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

Usage

1

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

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

Example output



Irescale documentation built on Nov. 22, 2019, 1:07 a.m.