library(tidyverse)
dcaiman.pred <-
function(CT, x, a = NULL) {
classes = CT[['classes']]
xtx = CT[['xtx']]
xtk = CT[['xtk']]
mx = CT[['cx']]
mk = CT[['ck']]
if(is.null(a)) {
a = CT[['a']]
}
valx = (classes, x = x, xxt = xtx, m = mx)
valy = (classes, x = valx, xxt=xtk, m = mk)
k = (classes, x, xtx, m = mx)
kk = (classes, k, xtk, m = mk)
kf = a*k + (1-a)*kk
.genmin(classes, kf)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.