View source: R/indefiniteLearning.R
correctionDefinite | R Documentation |
Correcting a (possibly indefinite) symmetric matrix with chosen approach so that it will have desired definiteness type: positive or negative semi-definite (PSD, NSD).
correctionDefinite(mat, type = "PSD", method = "flip", tol = 1e-08)
mat |
symmetric matrix |
type |
string that specifies type of correction: |
method |
string that specifies method for correction: spectrum clip |
tol |
torelance value. Eigenvalues between |
list with
mat
corrected matrix
isIndefinite
boolean, whether original matrix was indefinite
lambda
the eigenvalues of the original matrix
lambdanew
the eigenvalues of the corrected matrix
U
the matrix of eigenvectors
a
the transformation vector
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.NSD(D) #matrix should not be CNSD
D <- correctionDefinite(D,type="NSD")$mat
is.NSD(D) #matrix should now be CNSD
# different example: PSD kernel
D <- distanceMatrix(x,distancePermutationInsert)
K <- exp(-0.01*D)
is.PSD(K)
K <- correctionDefinite(K,type="PSD")$mat
is.PSD(K)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.