Commit 7ff0255f4da7463b9fafa951798ca92590bc61ab
1 parent
0200b0f89b
Exists in
master
Added the specification of executing entropySorted.R code.
Showing
1 changed file
with
12 additions
and
1 deletions
Show diff stats
README.md
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | a.) Install package "bnlearn" in R, (because I used "bnlearn" package in my code.): |
3 | 3 | install.packages("http://www.bnlearn.com/releases/bnlearn_latest.tar.gz") |
4 | 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. | |
5 | +2. Execute the CondIndependentTest.R code. | |
6 | 6 | a.)In Console of R, you type in: |
7 | 7 | source("/home/zgong001/Documents/SprinklerDataset/Rcode/CondIndependentTest.R") |
8 | 8 | The content in "" is the location where you put file CondIndependentTest.R. |
... | ... | @@ -13,4 +13,15 @@ |
13 | 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 | 14 | exfilename: is the full path and excel file name which you want to output your test result. |
15 | 15 | |
16 | + | |
17 | +3. Execute the entropySorted.R code. | |
18 | + a.)In Console of R, you type in: | |
19 | + source("/home/zgong001/Documents/SprinklerDataset/Rcode/entropySorted.R") | |
20 | + The content in "" is the location where you put file entropySorted.R. | |
21 | + If there are some errors, you should double check the path is correct. | |
22 | + b.)In Console of R, you type in something like the following: | |
23 | + EntropySorted(filename = "/home/zgong001/Documents/SprinklerDataset/sprinkler1001.txt", exfilename = "/home/zgong001/Documents/SprinklerDataset/pvalueSorted(sprinkler).xlsx") | |
24 | + filename: is the full path and file name of your data file. | |
25 | + exfilename: is the full path and excel file name which you want to output your test result. | |
26 | + | |
16 | 27 | 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. |
17 | 28 | \ No newline at end of file |