library(minerva)
x <- 0:200 / 200
y <- sin(10 * pi * x) + x
mine(x,y, n.cores=1)
Compute a single measure from the MINE suite using mine_stat.
Available mesures are: mic, mas, mev, mcn, tic, gmic
x <- 0:200 / 200
y <- sin(10 * pi * x) + x
mine_stat(x, y, measure="mic")
To compute the mic-r2 measure use the cor R function:
x <- 0:200 / 200
y <- sin(10 * pi * x) + x
r2 <- cor(x, y)
mm <- mine_stat(x, y, measure="mic")
mm - r2**2
## mine(x, y, n.cores=1)[[5]]
Compute statistic on matrices
All features in a single matrix (mine_compute_pstat).
All possible combination of features between two matrices (mine_compute_cstat).
When comparing two matrices the function check for euquality of number of rows of the two matrices. If the matrices have different number of rows then an error is thrown.
x <- matrix(rnorm(1000), ncol=10, nrow=10)
y <- as.matrix(rnorm(1000), ncol=10, nrow=20)
## Compare feature of the same matrix
pstats(x)
## Compare features of matrix x with feature in matrix y
cstats(x, y)
histogram of the distribution with cumulative distribution.
Observed values of tic_e for each pair of variable in datasaurus.
Observed distribution of tic_e.
P-value for each variable pair association.
ticnull <- mictools(datasaurus.m, nperm=10000, seed=1234)
## Get the names of the named list
names(ticnull)
##[1] "tic" "nulldist" "obstic" "obsdist" "pval"
Davide Albanese, Michele Filosi, Roberto Visintainer, Samantha Riccadonna, Giuseppe Jurman and Cesare Furlanello. minerva and minepy:a C engine for the MINE suite and its R, Python and MATLAB wrappers. Bioinformatics (2013) 29(3): 407-408 first published online December 14, 2012
Davide Albanese, Samantha Riccadonna, Claudio Donati, Pietro Franceschi. A practical tool for maximal information coefficient analysis. GigaScience (2018)
minerva
R package for Maximal Information-Based Nonparametric Exploration computation
Install
Usage
mine.mine_stat.mic-r2measure use thecorR function:Compute statistic on matrices
mine_compute_pstat).mine_compute_cstat).Mictools pipeline
This is inspired to the original implementation by Albanese et al. available in python here: https://github.com/minepy/mictools.
Reading the data from mictool repository
Compute null distribution for
tic_eAutomatically compute:
tic_enull distribution based on permutations.tic_efor each pair of variable indatasaurus.tic_e.Null Distribution
Observed distribution
Plot
tic_eand pvalue distribution.Use
p.adjust.methodto use a different pvalue correction method, or use theqvaluepackage to use Storey’s qvalue.Same table as above with the qvalue column added at the end.
Strenght of the association (MIC)
Association strength computed based on the
qvalueadjusted pvalueCiting minepy/minerva and mictools