View source: R/indefiniteLearning.R
correctionCNSD | R Documentation |
Correcting, e.g., a distance matrix with chosen methods so that it becomes a CNSD matrix.
correctionCNSD(mat, method = "flip", tol = 1e-08)
mat |
symmetric matrix, which should be at least of size 3x3 |
method |
string that specifies method for correction: spectrum clip |
tol |
torelance value. Eigenvalues between |
the corrected CNSD 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.
modelKriging
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 <- correctionCNSD(D)
is.CNSD(D) #matrix should now be CNSD
D
# note: to fix the negative distances, use repairConditionsDistanceMatrix.
# Or else, use correctionDistanceMatrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.