View source: R/indefiniteLearning.R
repairConditionsDistanceMatrix | R Documentation |
This function repairs distance matrices, so that the following two properties are ensured: The distance values should be non-zero and the diagonal should be zero. Other properties (conditionally negative semi-definitene (CNSD), symmetric) are assumed to be given.
repairConditionsDistanceMatrix(mat)
mat |
symmetric, CNSD distance matrix. If your matrix is not CNSD, use |
repaired distance matrix
Martin Zaefferer and Thomas Bartz-Beielstein. (2016). Efficient Global Optimization with Indefinite Kernels. Parallel Problem Solving from Nature-PPSN XIV. Accepted, in press. Springer.
correctionDefinite
, correctionDistanceMatrix
, correctionKernelMatrix
, correctionCNSD
, repairConditionsCorrelationMatrix
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)
D <- correctionCNSD(D)
D
D <- repairConditionsDistanceMatrix(D)
D
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.