Correction of a Distance Matrix
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
.
correctionDistanceMatrix( mat, type = "NSD", method = "flip", repair = TRUE, tol = 1e-08 )
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 |
list with corrected distance matrix mat
, isCNSD
(boolean, whether original matrix was CNSD) and transformation matrix A
.
Martin Zaefferer and Thomas Bartz-Beielstein. (2016). Efficient Global Optimization with Indefinite Kernels. Parallel Problem Solving from Nature-PPSN XIV. Accepted, in press. Springer.
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
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.