From 7ff0255f4da7463b9fafa951798ca92590bc61ab Mon Sep 17 00:00:00 2001 From: Zhenghua Gong Date: Wed, 28 Mar 2018 17:27:48 -0400 Subject: [PATCH] Added the specification of executing entropySorted.R code. --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- 2.29.0