correctionDistanceMatrix {CEGO} | R Documentation |
Correction of a Distance Matrix
Description
Convert (possibly non-euclidean or non-metric) distance matrix with chosen approach so that it becomes a CNSD matrix.
Optionally, the resulting matrix is enforced to have positive elements and zero diagonal, with the repair
parameter.
Essentially, this is a combination of functions correctionDefinite
or correctionCNSD
with repairConditionsDistanceMatrix
.
Usage
correctionDistanceMatrix(
mat,
type = "NSD",
method = "flip",
repair = TRUE,
tol = 1e-08
)
Arguments
mat |
symmetric distance matrix |
type |
string that specifies type of correction: |
method |
string that specifies method for correction: spectrum clip |
repair |
boolean, whether or not to use condition repair, so that elements are positive, and diagonal is zero. |
tol |
torelance value. Eigenvalues between |
Value
list with corrected distance matrix mat
, isCNSD
(boolean, whether original matrix was CNSD) and transformation matrix A
.
References
Martin Zaefferer and Thomas Bartz-Beielstein. (2016). Efficient Global Optimization with Indefinite Kernels. Parallel Problem Solving from Nature-PPSN XIV. Accepted, in press. Springer.
See Also
correctionDefinite
,correctionCNSD
,repairConditionsDistanceMatrix
Examples
x <- list(c(2,1,4,3),c(2,4,3,1),c(4,2,1,3),c(4,3,2,1),c(1,4,3,2))
D <- distanceMatrix(x,distancePermutationInsert)
is.CNSD(D) #matrix should not be CNSD
D <- correctionDistanceMatrix(D)$mat
is.CNSD(D) #matrix should now be CNSD
D