diff --git a/README.md b/README.md index 0e6de16..171a172 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 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. +2. Execute the CondIndependentTest.R 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. @@ -13,4 +13,15 @@ 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. + +3. Execute the entropySorted.R code. + a.)In Console of R, you type in: + source("/home/zgong001/Documents/SprinklerDataset/Rcode/entropySorted.R") + The content in "" is the location where you put file entropySorted.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: + EntropySorted(filename = "/home/zgong001/Documents/SprinklerDataset/sprinkler1001.txt", exfilename = "/home/zgong001/Documents/SprinklerDataset/pvalueSorted(sprinkler).xlsx") + filename: is the full path and file name of your data file. + exfilename: is the full path and excel file name which you want to output your test result. + Note: The the data in data file could not be integer, for example 0, 1. It should be string, like s0, s1, or good, bad or state0 or state1. \ No newline at end of file