Last chance! 50% off unlimited learning
Sale ends in
Convert a non-PSD kernel matrix with chosen approach so that it becomes a PSD matrix.
Optionally, the resulting matrix is enforced to have values between -1 and 1 and a diagonal of 1s, with the repair
parameter.
That means, it is (optionally) converted to a valid correlation matrix.
Essentially, this is a combination of correctionDefinite
with repairConditionsCorrelationMatrix
.
correctionKernelMatrix(mat, method = "flip", repair = TRUE, tol = 1e-08)
list with corrected kernel matrix mat
, isPSD
(boolean, whether original matrix was PSD), transformation matrix A
,
the matrix of eigenvectors (U
) and the transformation vector (a
)
symmetric kernel matrix
string that specifies method for correction: spectrum clip "clip"
, spectrum flip "flip"
, nearest definite matrix "near"
, spectrum square"square"
, spectrum diffusion "diffusion"
.
boolean, whether or not to use condition repair, so that elements between -1 and 1, and the diagonal values are 1.
torelance value. Eigenvalues between -tol
and tol
are assumed to be zero.
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
, 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)
K <- exp(-0.01*D)
is.PSD(K) #matrix should not be PSD
K <- correctionKernelMatrix(K)$mat
is.PSD(K) #matrix should now be CNSD
K
Run the code above in your browser using DataLab