Computation of the kernel matrix between the training and prediction sets

cmf_kernel_matrix_tp(ft, mdb1, mdb2, alpha, verbose)

Arguments

ft

mb1

mb2

alpha

verbose

1

Details

Value

References

Note

See also

Examples

##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as cmf_kernel_matrix_tp <- function(ft, mdb1, mdb2, alpha, verbose=1) { nmol1 <- length(mdb1) nmol2 <- length(mdb2) gram <- matrix(0, nmol1, nmol2) atomlists1 <- make_atom_lists(ft, mdb1) atomlists2 <- make_atom_lists(ft, mdb2) for (imol1 in 1:nmol1) { mol1 <- mdb1[[imol1]] for (imol2 in 1:nmol2) { mol2 <- mdb2[[imol2]] gram[imol1,imol2] <- cmf_kernel_al(ft, mol1, mol2, alpha, atomlists1[[imol1]], atomlists2[[imol2]]) } if (verbose) {cat("."); flush.console()} } if (verbose) {cat("\n"); flush.console()} gram }