MIC
MINE方法一
java -jar MINE.jar WHO.csv 4 8 cv=0.1
java -jar MINE.jar WHO.csv 4 cv=0.7
cv设定的是MIC的值????
方法二
install.packages("rJava") # 1-time initialization step
> library(rJava)
> source("c:\\TEMP\\MINE.r")
> MINE("c:\\TEMP\\WHO.csv","all.pairs")
报错:
错误于.jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
> MINE("c:\\TEMP\\WHO.csv",4,8)
How to run MINE in Java
First, make sure Java is installed. Then download MINE.jar, open a command prompt, and type
java -jar MINE.jar
followed by the necessary command-line parameters.
How to run MINE in R
First, make sure both R and Java are installed. Next, download and save both MINE.jar and MINE.r into the same directory and make that directory the working directory in R. The example below then runs MINE on all the variable pairs in the file example.csv.
install.packages("rJava") # 1-time initialization step
source("MINE.R")
MINE("example.csv","all.pairs")
The library exposes two functions: MINE, and rMINE. The difference between them is that MINE takes as input a path to a csv file to be analyzed, while rMINE takes as input an R matrix containing the data to be analyzed. Both functions take parameters identical to those in the Java version. For additional information, see the comments in MINE.r.
MINE’s parameters
The following is a non-comprehensive list of MINE’s input parameters and their default values. The complete list is available as a pdf.
- To determine which variables MINE compares to each other, one of the following flags is required immediately following the name of the input file: ‘-allPairs’ compares all pairs of variables against each other, ‘-adjacentPairs’ compares consecutive pairs of variables only; ‘-masterVariable i’ or just a number i compares all variables only against the i-th variable; ‘-onePair i j’ or just the pair i j compares only the i-th variable against the j-th variable; ‘-pairsBetween i’ will compare each of the first i variables against each of the rest of the variables. Variables are indexed from 0.
- cv : A floating point number indicating which percentage of the records need to have data in them for both variables before those two variables are compared. This parameter is optional, and its default value is 0.
- exp : The exponent that determines how many cells are allowed in the grids considered by the algorithm. This parameter controls the value of α in the equation B(n) = nα. It is optional, and its default value is 0.6.
- c: Determines by what factor clumps may outnumber columns when OptimizeXAxis is called. When trying to partition the x-axis into x columns, the algorithm will start with at most cx clumps. This number can be made smaller to increase speed, and it can be made larger to make the approximation of the characteristic matrix closer to optimal. This parameter is optional, and its default value is 15.
Example
java -jar MINE.jar Spellman.csv 0 cv=0.7
will run the Java version of MINE on the file 'Spellman.csv'. The only variable pairs that will be analyzed are the first variable against the rest of the variables. A variable pair will be ignored if fewer than 70% of the records have values for both the variables in question. Try executing this line after dowloading the gene expression data set available on our site and saving it with the name 'Spellman.csv' into the same folder as MINE.jar.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/27573546/viewspace-747785/
,如需转载,请注明出处,否则将追究法律责任。