Commit f91ce4fa794132732813f81483652dea6ccd1716

Authored by Zhenghua Gong
1 parent 1c91b280d2
Exists in master

Updated README file which explained how to execute the CondIndependentTest.R.

Showing 1 changed file with 14 additions and 0 deletions   Show diff stats
1 1. To execute the R code of CondIndependentTest.R, you need do some preparation.
2 a.) Install package "bnlearn" in R, (because I used "bnlearn" package in my code.):
3 install.packages(​"http://www.bnlearn.com/releases/​bnlearn_latest.tar.gz")
4 b.) Download file CondIndependentTest.R and put it in a folder (For example, put it in folder "/home/zgong001/Documents/SprinklerDataset/CondIndependentTest.R").
5 2. Execute the code.
6 a.)In Console of R, you type in:
7 source("/home/zgong001/Documents/SprinklerDataset/Rcode/CondIndependentTest.R")
8 The content in "" is the location where you put file CondIndependentTest.R.
9 If there are some errors, you should double check the path is correct.
10 b.)In Console of R, you type in something like the following:
11 CondIndTwoVar(filename = "/home/zgong001/Documents/SprinklerDataset/sprinkler1001.txt", methodu="x2", exfilename = "/home/zgong001/Documents/SprinklerDataset/pvalueSorted(sprinkler).xlsx")
12 filename: is the full path and file name of your data file.
13 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.
14 exfilename: is the full path and excel file name which you want to output your test result.