goldingn / gpe

Gaussian process everything - an R package to reimplement and combine common statistical models using GPs
MIT License
26 stars 5 forks source link

create diag method for kernels #13

Closed goldingn closed 9 years ago

goldingn commented 9 years ago
diag(kernel, data)

To return a vector of the diagonal elements, optionally as a diagonal matrix.

Add a function to compute diagonal in each kernel's object, and access these as the diag method

goldingn commented 9 years ago

Done, with commits 92c70184fd 92c70184fd Syntax is now:

kernel(data, diag = TRUE)
kernel(data, newdata, diag = TRUE)