productXKY <- function(i, Y, XKX) {
xkx <- XKX[[i]][[1]]
xk <- XKX[[i]][[2]]
xky <- xk%*%Y
ans <- xkx%*%xky
ans
}
productYKX <- function(i, Y, K, XX) {
# not called so far ... think about how to make comparable with XKX
yk <- crossprod(Y, K[[i]])
yky <- geninv(yk%*%Y) # improve
ykx <- yk%*%XX[[i]]
ans <- yky%*%ykx
ans
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.