diff --git a/README.md b/README.md index e69de29..36dbd0c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,14 @@ +1. To execute the R code of CondIndependentTest.R, you need do some preparation. + a.) Install package "bnlearn" in R, (because I used "bnlearn" package in my code.): + install.packages(​"http://www.bnlearn.com/releases/​bnlearn_latest.tar.gz") + b.) Download file CondIndependentTest.R and put it in a folder (For example, put it in folder "/home/zgong001/Documents/SprinklerDataset/CondIndependentTest.R"). +2. Execute the code. + a.)In Console of R, you type in: + source("/home/zgong001/Documents/SprinklerDataset/Rcode/CondIndependentTest.R") + The content in "" is the location where you put file CondIndependentTest.R. + If there are some errors, you should double check the path is correct. + b.)In Console of R, you type in something like the following: + CondIndTwoVar(filename = "/home/zgong001/Documents/SprinklerDataset/sprinkler1001.txt", methodu="x2", exfilename = "/home/zgong001/Documents/SprinklerDataset/pvalueSorted(sprinkler).xlsx") + filename: is the full path and file name of your data file. + methoudu: is the method you'll choose to do conditional independence test. You could choose "x2" or "mi". "x2" means Chi-Square Test of Independence and "mi" means mutual information test. + exfilename: is the full path and excel file name which you want to output your test result. \ No newline at end of file