Skip to contents

The dual form is what makes a kernel method possible: the fit depends on the data only through the Gram matrix, so the implied feature space never has to be built. The penalty earns its place twice over – it controls smoothness, and it is what keeps the near-singular Gram matrix of any smooth kernel invertible.

Usage

KrrFDA(X, y, kernel = "gaussian", lam = 1, x_eval = NULL, bandwidth = NULL)

Arguments

X

Predictor of length n.

y

Response of length n.

kernel

One of "gaussian", "epanechnikov", "uniform".

lam

Ridge penalty, strictly positive.

x_eval

Evaluation points; defaults to X.

bandwidth

Kernel bandwidth; Silverman's rule when NULL.

Value

Whatever Krreg returns, unchanged.

Details

An alias. The solver is Krreg; krrFDA is the same method as krreg and it is the same dual solve, so only the argument order and the penalty's name differ here.

Formula: alpha = (K + lambda I)^{-1} y.

References

Saunders, C., Gammerman, A. and Vovk, V. (1998). Proceedings of the 15th International Conference on Machine Learning, 515-521.

See also

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
KrrFDA(V, V)
#> $x_eval
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $y_hat
#> [1] 0.7550764 1.2735254 1.8811459 2.5419210 3.2280257 3.8108440 3.9828942
#> [8] 3.4640157
#> 
#> $alpha
#> [1] 0.2449236 0.7264746 1.1188541 1.4580790 1.7719743 2.1891560 3.0171058
#> [8] 4.5359843
#> 
#> $bandwidth
#> [1] 1.713024
#> 
#> $penalty
#> [1] 1
#> 
#> $n_obs
#> [1] 8
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"