Converts distance
objects into similarity
objects.
dist2sim(dist, transform, k = 1, normalise = TRUE, max_d)
object of class distance
object of class character
, can be either "linear"
or "exponential"
scaling parameter
object of class logical
, which when TRUE will
normalise distances to one
object of class numeric
dist2sim(x)
returns an object of class similarity
.
Distances can be transformed either *linearly* or *exponentially*. That is
1 - k * dist
for non-negative values, or exp(-k * dist)
,
respectively. If normalise
is true, then dist = dist/max_d
.