Learn R Programming

CEGO (version 2.4.3)

correctionCNSD: Correcting Conditional Negative Semi-Definiteness

Description

Correcting, e.g., a distance matrix with chosen methods so that it becomes a CNSD matrix.

Usage

correctionCNSD(mat, method = "flip", tol = 1e-08)

Value

the corrected CNSD matrix

Arguments

mat

symmetric matrix, which should be at least of size 3x3

method

string that specifies method for correction: spectrum clip "clip", spectrum flip "flip", nearest definite matrix "near", spectrum square"square", spectrum diffusion "diffusion".

tol

torelance value. Eigenvalues between -tol and tol are assumed to be zero.

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

modelKriging

Examples

Run this code
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.

Run the code above in your browser using DataLab