Description Usage Arguments Examples
Mutual Information Calculation
1 2 |
dt |
a data.frame object |
var.d |
the name of the discrete variable in quotations |
var.c |
the name of the continuouse variable in quotations |
k |
the number of neighbors for MI calculation. |
warnings |
set to FALSE to hide warnings |
FORCE |
set to TRUE continues despite not using an optimum k |
global |
set to FALSE to get specific MI |
quite |
set to TRUE to prevent messages being displayed to the console |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(miknn)
#TCGA data
data("gene_exp",package = "miknn")
gene_exp
# basic example using k = 10
mi_knn(dt = gene_exp, var.d = "project", k = 10, var.c = "CCND1")
# the function can decide the optimum k
mi_knn(dt = gene_exp, var.d = "project", var.c = "CCND1")
# set global = FALSE to get the specific MI for each levels,
mi_knn(dt = gene_exp, var.d = "project", var.c = "CCND1", global = FALSE)
# generating a plot for specific MI
res <- mi_knn(dt = gene_exp, var.d = "project", var.c = "CCND1", global = FALSE)
plot(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.