correctionKernelMatrix {CEGO} | R Documentation |

## Correction of a Kernel (Correlation) Matrix

### Description

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`

.

### Usage

```
correctionKernelMatrix(mat, method = "flip", repair = TRUE, tol = 1e-08)
```

### Arguments

`mat` |
symmetric kernel matrix |

`method` |
string that specifies method for correction: spectrum clip |

`repair` |
boolean, whether or not to use condition repair, so that elements between -1 and 1, and the diagonal values are 1. |

`tol` |
torelance value. Eigenvalues between |

### Value

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`

)

### 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

`correctionDefinite`

, `repairConditionsCorrelationMatrix`

### Examples

```
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
```

*CEGO*version 2.4.3 Index]