Software Listing of Author : "Guangdi Li"
- Causal Polytree ---Pearl's classical algorithm(1988)
- License: Shareware
- Price:


As a famous sub-structure of Bayesian network, causal polytree is able to recover the causality very efficiently. Here, I implement pearl's classical algorithm here for easy using. Details can be seen in Pearl's paper[1]. To recover general Causal polytree, one can download "Fisher's exact test" in my space for conditional independence test. One can start from ControlCenter.m, I add a simple example there for better understanding. If there is any question, just let me know, I will response to you as soon as possible. [1] G. Rebane, J. Pearl, The recovery of causal poly-trees from statistical data, in: Proceedings of the Third Conference on Uncertainty Artificial Intelligence, Seattle, Washington, 1987, pp. 222 228
- Publisher: Guangdi Li
- Date Released: 14-05-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Extended (n,k)-gray code
- License: Freeware
- Price: 0.00


Our basic idea is based on (n,k)-gray code which was introduced in one paper named :"Generalized Gray Codes with Applications". Our extention is allowing each digit ranged from different digit which is widely useful in some situations.For example, (3,2)-Gray code is (0,0), (0,1), (0,2),(1,2),(1,0),(1,1),(2,1),(2,2),(2,0). The parameter 3 is the range of each digit {0,1,2}, and 2 restricts there are 2 digits. Our extended gray code is working in this way. For example, if we want to generate gray code with the range of {2 3 3 4} for each digit as input parameter, our function will produce: 0000,1000,1100,0100,0200,1200,1210,0210,........ in total of 72 sequences. Please start from 'ControlCenter.m', we give an example there with detailed explanation. I also add mex programming function for fast generation, good for advance...
- Publisher: Guangdi Li
- Date Released: 03-03-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Fisher's Exact Test for beginners
- License: Shareware
- Price:


A simple, fast and short code for beginners, who cares about Fisher's Exact Test, . As a beginner, at least you need to know what we do with Fisher's Exact Test (see [1][2]). My function is simple, Pvalue = FisherExactTest22(x,y) Input: either 2*2 contigency table or two vectors, Output: four p-values at, left tail , Right tail, 2-tails, and Mid-p correction for 2-tails . Well, if you don't know anything about how to choose, as a beginner, I suggested you use 2-tails, that is : Pvalue(3) Attention: if you have contigency table more complex to 2*2, refer to my another algorithm at : http://www.mathworks.com/matlabcentral/fil...ntingency-table Please start from "ControlCenter.m", two examples are there. Let me know any question you have, I will try to response to you as soon as possible.
- Publisher: Guangdi Li
- Date Released: 15-06-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Fisher's exact test with n x m contingency table
- License: Shareware
- Price:


Fisher's exact test is a statistical test used to determine if there are nonrandom associations between two categorical variables[1]. The job of Fisher's exact test with 2 x 2 or 2x 3 contingency table is already easily done by others. However, the one with n x m contingency table hasn't found , or with bad computation. This function efficiently deals with Fisher's exact test with n x m contingency table. As for the function : [ Sig,PValue,ContigenMatrix ] = FisherExactTest( XVector,YVector ) Input : the data of two variables X,Y as XVector and YVector Or you can just input the contingency table. Output: "Sig" returns 1 if X and Y associate,otherwise 0 "PValue" returns the computed p-value "ContigenMatrix" returns the n x m contingency table Please start with "Controlcenter.m", there are two simple example for explanation. If...
- Publisher: Guangdi Li
- Date Released: 23-05-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Maximum(minimum) Weight Spanning Tree ( Directed )
- License: Freeware
- Price: 0.00


We use the idea of Chu-Liu/Edmonds Algorithm, see paper [1,2], to implement four functions here. 1. Maximal Directed Maximum Spanning Tree By DirectedMaximumSpanningTree.m 2. Minimal Directed Maximum Spanning Tree By DirectedMinimalSpanningTree.m 3. Maximal Directed Maximum Spanning Forest By MaximalDirectedMSF.m 4. Minimal Directed Maximum Spanning Forest By MinimalDirectedMSF.m One could start with "ControlCenter.m", here is one simple example and explanation for how to use the code. As for advance users, I also improve the code by mex programming , it is able to handle variables over 1000 in dataset, check the fold named as : AdvanceUser If there is any problem, please let me know, i will help you as soon as possible. Attention: mex compiler should be ready in your matlab. [1] Y. J. Chu and T. H. Liu, ``On the shortest...
- Publisher: Guangdi Li
- Date Released: 04-02-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Mutual Information In probability theory and information theory
- License: Shareware
- Price:


The definition of mutual information could resort to wiki: http://en.wikipedia.org/wiki/Mutual_information For marginal mutual information, we say it is : I(A,B)=sum sum P(A,B) log[P(A,B)/P(A)P(B)] For conditional mutual information, we say it is : I(A,B|C)=sum sum P(A,B|C) log[P(A,B|C)/P(A|C)P(B|C)] For mutual information matric, we say it is: the matric saves all pairs of I(A,B) Please refer to "ControlCentor.m", we have a simple example for you understanding. If there is any question, please let me know, i will help you as soon as possible. PS: fast mex programming functions are provided for advance users here too
- Publisher: Guangdi Li
- Date Released: 26-02-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Probablistic Logic Sampling (PLS)
- License: Shareware
- Price:


The probabilistic logic sampling algorithm is described in (Henrion 1988). Here is the website: http://genie.sis.pitt.edu/wiki/Stochastic_Sampling_Algorithms:_Probabilistic_Logic_Sampling About the theory under PLS, please refer to Max Henrion: Practical issues in constructing a Bayes belief network. Int. J. Approx. Reasoning 2(3): 337 (1988) If there is any problem of my code, let me know..
- Publisher: Guangdi Li
- Date Released: 09-04-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts