Learn R Programming

FastKRR (version 0.1.2)

summary.krr: Summary method for fitted Kernel Ridge Regression models

Description

Displays key information from a fitted Kernel Ridge Regression (KRR) model, including the original call, first few coefficients, a 6×6 block of the kernel (or approximated kernel) matrix, and the main kernel options.

Usage

# S3 method for krr
summary(object, ...)

Value

A human-readable summary of the fitted KRR model to the console.

Arguments

object

An S3 object of class krr, typically returned by fastkrr.

...

Additional arguments (currently ignored).

See Also

fastkrr

Examples

Run this code
# Data setting
set.seed(1)
lambda = 1e-4
d = 1
n = 50
rho = 1
X = matrix(runif(n*d, 0, 1), nrow = n, ncol = d)
y = as.vector(sin(2*pi*rowMeans(X)^3) + rnorm(n, 0, 0.1))

# Example: exact
model = fastkrr(X, y,
                kernel = "gaussian", opt = "exact",
                rho = rho, lambda = 1e-4)
class(model)

summary(model)

Run the code above in your browser using DataLab