Skip to contents

Formula: K is a kernel iff the Gram matrix is symmetric positive semi-definite: min eigenvalue(K) >= 0

Usage

Mercerchk(K, tol = 1e-09)

Arguments

K

Candidate Gram matrix.

tol

Negative eigenvalues larger in size than tol fail the check.

Value

List with is_kernel, min_eigenvalue, eigenvalues, symmetry_gap, n.

References

Montesinos Lopez, Montesinos Lopez and Crossa (2022), Multivariate Statistical Machine Learning Methods for Genomic Prediction, Springer, doi:10.1007/978-3-030-89010-0. Chapter 8, Sect. 8.2.1 p. 255, property 2 and property 3: the Gram matrix K with entries K(x_i, x_j) must be positive semi-definite for every choice of x_1, ..., x_n, and the book states that Mercer's theorem – the integral condition on square-integrable g – is an equivalent formulation of that finitely positive semi-definite property. The finite check is therefore the one implemented. Read from the chapter PDF, not recalled.

Examples

Mercerchk(K = 5L)
#> $is_kernel
#> [1] TRUE
#> 
#> $min_eigenvalue
#> [1] 5
#> 
#> $eigenvalues
#> [1] 5
#> 
#> $symmetry_gap
#> [1] 0
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "Mercer / positive semi-definiteness check, MVSML Sect. 8.2.1"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"