Description Usage Arguments Examples
Indicator kernel matrix
1 | cmf_indicator_kernel_matrix(mdb, alpha, syb_type, verbose)
|
mdb |
|
alpha |
|
syb_type |
|
verbose |
1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ##---- 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_indicator_kernel_matrix <- function(mdb, alpha, syb_type, verbose=1) {
nmol <- length(mdb)
gram <- matrix(0, nmol, nmol)
for (imol in 1:nmol) {
if (verbose) {cat("."); flush.console()}
mol <- mdb[[imol]]
gram[imol,imol] <- cmf_indicator_kernel(mol, mol, alpha, syb_type)
}
if (verbose) {cat("\n"); flush.console()}
for (imol1 in 1:(nmol-1)) {
mol1 <- mdb[[imol1]]
if (verbose) {cat("."); flush.console()}
for (imol2 in (imol1+1):nmol) {
mol2 <- mdb[[imol2]]
gram[imol1,imol2] <- cmf_indicator_kernel(mol1, mol2, alpha, syb_type)
gram[imol2,imol1] <- gram[imol1,imol2]
}
}
if (verbose) {cat("\n"); flush.console()}
gram
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.