Search Comments and Ratings

go

   
Date File Comment by Comment Rating
02 Feb 2015 CAIM Discretization Algorithm CAIM (class-attribute interdependence maximization) is designed to discretize continuous data. Author: Guangdi Li

Guangdi Li (view profile)

Hemanth

Thanks for the code Guangdi Li.
I have a question regarding the class labels. I am not able to understand the class labels assigned to the Yeast dataset. Aren't the class label supposed to be a binary indicator matrix with 1ofK coding?

4
22 Jul 2014 Fisher's Exact Test for beginners. For beginners, who loves Fisher's Exact Test but hates the theory behind. Author: Guangdi Li

Guangdi Li (view profile)

Luke

Luke (view profile)

strongly not recommended to use this software as it returns incorrect p values.

1
07 Jul 2014 Amino acid conservation.zip Analysis of amino acid conservation using conservation index Author: Guangdi Li

Guangdi Li (view profile)

James

James (view profile)

Fig. 1B should be removed. It is misleading because your code does not produce it.

4
16 May 2014 Mutual Information In probability theory and information theory Code for marginally and conditional mutual information in probability and information theory Author: Guangdi Li

Guangdi Li (view profile)

mei

mei (view profile)

I guess, this is a silly question, anyway, I do not understand what is the LGObj which CMI asks as its input together with variables. Can you please make it clear for me?

Thanks in advance.

Comment only
21 Apr 2014 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Jian Zhang

Please address the p-value issue as questioned in earlier posts, otherwise this test is useless.

1
17 Feb 2014 Maximum Weight Spanning tree (Undirected) Chu-Liu-Edmonds Algorithm for learning "Undirected Maximum Weight Spanning tree" is proposed here. Author: Guangdi Li

Guangdi Li (view profile)

Yaser

Yaser (view profile)

Doesn't work when there are isolated nodes in the graph.

3
01 Dec 2013 K2 algorithm for learning DAG structure in Bayesian network This is the code of Cooper's K2 algorithm proposed in 1992, quick and convenient for using. Author: Guangdi Li

Guangdi Li (view profile)

fasilkom

I'm studying about learning temporal node bayesian networks. From the paper i got before, i get that ordering is doing by partial set of ordering, for example we order {1}, {3 5 6} and {2 4}. In your code i get that ordering is given in one time (1 3 5 6 2 4). I've been trying to make a modification in your code but i failed. How can i modif it? Is there any suggestion? Thanks

Comment only
29 Aug 2013 Extended (n,k)-gray code We extend normal gray code to conside about different range for each digit. Author: Guangdi Li

Guangdi Li (view profile)

Marino Pagan

Good function.

It wasn't clear to me at first how to use it: the input argument needs to be a row vector, and each element specifies the range of the corresponding digit.

n-digit binary gray code:
ImprovedGenerateGrayCode( 2*ones(1,n) )

n-digit ternary gray code: ImprovedGenerateGrayCode( 3*ones(1,n) )

and so on

5
06 Jun 2013 K2 algorithm for learning DAG structure in Bayesian network This is the code of Cooper's K2 algorithm proposed in 1992, quick and convenient for using. Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

Dear Pedro:

I advise you to use software Graphviz, or draw in photoshop, or powerpoint.

Regarding the mapping of nodes in matlab, it takes extra effort to make it beautiful. You can refer to my paper: Bielza, C., Li, G. & LarraƱaga, P. (2011). Multi-Dimensional Classification with Bayesian Networks. International Journal of Approximate Reasoning, 52, 705-727.

thanks for your interest!

Comment only
06 Jun 2013 K2 algorithm for learning DAG structure in Bayesian network This is the code of Cooper's K2 algorithm proposed in 1992, quick and convenient for using. Author: Guangdi Li

Guangdi Li (view profile)

Pedro

Pedro (view profile)

Hi, is there a way to name the nodes? Not having them show like node 1, etc. Thanks

5
15 May 2013 Maximum(minimum) Weight Spanning Tree ( Directed ) For learning "Directed Maximum Spanning Tree", Chu-Liu/Edmonds Algorithm is implemented here. Author: Guangdi Li

Guangdi Li (view profile)

Berkan Sesen

I spent half a day to get this working. My mex compiler on Windows MatLab works, but SearchCycleNode.c cannot be compiled...
If you are using Windows, this submission is useless I guess. The author claims it works with Linux matlab but I couldn't test.

1
15 May 2013 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Julio Zaragoza

I closed my Karin Zachinelly account. My CACC implementation files are in Julio Zaragoza's account now.

Please, if you find any bugs in my implementation, let me know.

Comment only
20 Feb 2013 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

karin Zachinelly

This implementation is not complete and it is actually incorrect, for starters the CACC is not computed. This code obtains y' and takes that as the CACC (which is obviously wrong). And the algorithm is not implemented in full as described in the paper.

That is why people that tries this code with the data from the paper obtain different results.

People please check my (hopefully correct) implementation and let me know about any bugs.

1
20 Feb 2013 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

karin Zachinelly

1
17 Jan 2013 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Simon

Simon (view profile)

As has been addressed before, this script does not calculate the p-value. Please see Metha and Patel (1986) for improving your code.

1
26 Feb 2012 NPC algorithm for learning DAG in Bayesian network NPC algorithm is designed for learning Bayesian network formed as DAG in 2001, by Steck Author: Guangdi Li

Guangdi Li (view profile)

Khan

Khan (view profile)

I downloaded the code (npc) but could not run it as 'TrainingDatabase.mat' file is missing.

load('C:\Documents and Settings\newstar\My Documents\MATLAB\Myprogram\TrainDatabase.mat','Training_Database');

Comment only
05 Jan 2012 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

FIR

FIR (view profile)

hi i have used this algorithm for my data set as indicated in my paper , in which the cacc and cut off points does not match according to my paper ,please help..

my dataset is

age=[3 ;56 ;15 ;17 ;21 ;35 ;45 ;46 ;51 ;56 ;57;66 ;70 ;71 ]

Comment only
20 Dec 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

FIR

FIR (view profile)

I hava a dataste of 5 columns say the 1st column has numbers 60 numbers randomlf between 1 to 100,now i want to set a cut off point for this dataset ,is it possible with this algorithm,

cut of point means
for ex-0-10
10-30
30-50
50-80
80-100

Comment only
09 Dec 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Emmanuel

You have not addressed the comment from Mike above, which is crucial. If Mike is correct, which to me appears to be the case, your function does not compute the Pvalue, but the Pcutoff (equation (2) in the mathworld link). Please address this issue as this is not a minor distinction at all.

1
02 Dec 2011 Maximum Weight Spanning tree (Undirected) Chu-Liu-Edmonds Algorithm for learning "Undirected Maximum Weight Spanning tree" is proposed here. Author: Guangdi Li

Guangdi Li (view profile)

Sim

Sim (view profile)

its okie.... i know its my problem and i have to deal with it myself... :S

GOD BLESS U

Comment only
02 Dec 2011 Maximum Weight Spanning tree (Undirected) Chu-Liu-Edmonds Algorithm for learning "Undirected Maximum Weight Spanning tree" is proposed here. Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

I would like to help, but I don't have time, sorry.

Comment only
02 Dec 2011 Maximum Weight Spanning tree (Undirected) Chu-Liu-Edmonds Algorithm for learning "Undirected Maximum Weight Spanning tree" is proposed here. Author: Guangdi Li

Guangdi Li (view profile)

Sim

Sim (view profile)

Thanks for the help

Comment only
02 Dec 2011 Maximum Weight Spanning tree (Undirected) Chu-Liu-Edmonds Algorithm for learning "Undirected Maximum Weight Spanning tree" is proposed here. Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

I guess that's the task of your project, no?

Comment only
02 Dec 2011 Maximum Weight Spanning tree (Undirected) Chu-Liu-Edmonds Algorithm for learning "Undirected Maximum Weight Spanning tree" is proposed here. Author: Guangdi Li

Guangdi Li (view profile)

Sim

Sim (view profile)

Hello Guangdi Li,

I require a code for enumerating all possible spanning trees of an undirected connected graph. By using the Cayley's formula, i first need to take out the total number of spanning trees of a graph and then i need to create that total number of spanning trees through a code.... I'm completely new to matlab and i need to complete my university project as soon as possible.
Please help.
Sim

Comment only
20 Sep 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

karin Zachinelly

You are the best, Guangdi!

5
20 Sep 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

Thanks for report, Karin.

The infinite problem is solved and a new version based on matlab-R is provided(for those who are familiar with fisher test in R).

Comment only
14 Sep 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

karin Zachinelly

Hello Guangdi, there seems to be a bug on this function, if you try, for example, with these two vectors, the function enters into an infinite loop:

X = [1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,2,1,2,1,1,1,1,1,1,1,2,2,1,1,1,2,1,1,2,1,1,1,2,2,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1];

Y = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,2,2,2,1,2,2,2,1,2,2,1,1,2,2,2,2,1,2,1,2,1,2,2,1,1,2,2,2,2,2,1,2,2,2,2,1,2,2,1,1,2,2,2,1,2,2,1];

Cheers

Comment only
05 Sep 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

You can use the returned variable: DiscretizationSet, to discrete new continuous data. DiscretizationSet is a matrix containing K row and F columns, each column represent one feature, following your input feature data, then the cutoff is saved in corresponding column for your new discretization.
hope it is clear :)

Comment only
03 Sep 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Prachitee Shekhawat

hi,i hav used this algorithm for classification.Soi have used your algorithm to convert the continous value into discrete and form an classifer.n after generating the classifer user will enter the continuous value to get the output.So i want 2 know that can i convert the user entered continous value to discrete value(based on the previous discrete interval)?

Comment only
16 Jun 2011 Fisher's Exact Test for beginners. For beginners, who loves Fisher's Exact Test but hates the theory behind. Author: Guangdi Li

Guangdi Li (view profile)

Tobias

Tobias (view profile)

Compare

FisherExactTest22([8 2; 2 8] )

with

FisherExactTest22([2 8;8 2] )

why does turning the CT upside down change the 2-sided p-values and not the 1-sided p-values?

Comment only
11 Apr 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Mike

Mike (view profile)

I think you only implemented equation (2) from the link you posted. If you read what's written on that page after equation (2), you will find this:

"Now find all possible matrices of nonnegative integers consistent with the row and column sums Ri and Cj. For each one, calculate the associated conditional probability using (2), where the sum of these probabilities must be 1.

To compute the P-value of the test, the tables must then be ordered by some criterion that measures dependence, and those tables that represent equal or greater deviation from independence than the observed table are the ones whose probabilities are added together."

Comment only
07 Apr 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Edek

Edek (view profile)

Hi, i want to know if there is a solution for my discretization problem. The problem is this:
>> A = xlsread('example2.xls');
>> [ DiscretData,DiscretizationSet1 ] = CACC_Discretization( A, 3 )
??? Undefined function or method 'CACC_Discretization' for input arguments of type 'double'.

So... its possible to work when we have arguments of type double?
I can end you my file, in order that you can see my mistake.
Thank you so much, and sorry for your time waste in answer this easy question.

Comment only
06 Apr 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

I only did the programming based on the mathworld website. Indeed, there may be some fast and efficient way for n * m table, if so, please let me know the reference for further improvement.Thanks for comments.

Comment only
06 Apr 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Mike

Mike (view profile)

This doesn't correctly compute a fisher exact test p-value. It only computes the probability of exactly getting the observed contingency table. To compute a p-value, one must compute the probability of obtaining the observed results *OR SOMETHING MORE EXTREME*. In this case, one has to sum the probabilities over all possible "More extreme" contingency tables; this sum is the value of the Fisher Exact Test.

1
21 Mar 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

wahyu powh

Hello...
i have question.
I still do not understand the calculate cacc

where at paper tsai calculate cacc
(Tsai, C.J., Lee, C.I., Yang, W.P.,2008, A Discretization Algorithm Based on Class-Attribute Contingency Coefficient, Science Direct)
cacc=(y'/y'+M)^0.5
y'=M[..... -1]/log(n)

and your code
for p = 1:C
for q = 1:k
if RowQuantaMatrix( p ) > 0 && ColumnQuantaMatrix( q ) > 0
CACCValue = CACCValue + ( QuantaMatrix( p,q ) )^2/( RowQuantaMatrix( p )*ColumnQuantaMatrix( q )) ;
end
end
end
CACCValue = M*( CACCValue-1 )/log2(k+1) ;

why this different, not like in paper tsai?

your calculate final cacc= M*(CACCvalue-1) /log2(k+1)
so your final cacc=Y' in paper tsai

and i'm tried with dataset at Paper tsai (table age : 2 attribute- Age&target class)
Im compare result different between your code & paper (value cacc & cutting point)
explanation please...

Thx

Comment only
20 Mar 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

zapp

zapp (view profile)

ehm, disregard my previous message. I see the way the class affiliation is coded. I usually worked with one vector multiclass coding. thx

4
20 Mar 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

zapp

zapp (view profile)

hi there
can the class variable be other than of binary type?
thx for thx code

Comment only
15 Mar 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Yoann

Yoann (view profile)

Hello,
is this discretization scheme, could work with dataset containing negative and positive values?

Comment only
27 Feb 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Prachitee Shekhawat

thank you for your help. i apologize for such a silly question. thank oyu once again.

Comment only
17 Feb 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

For iris dataset, create a matrix like [attribute1,attribute2,attribute3,attribute4,ClassVariable], then use command:

[discrete,discretizationset]= CACC_Discretization(originaldata,1)

In matlab, you can do it like:

load fisheriris
N = size( meas,1 );
originaldata = [ meas,zeros(N,1) ];
for p = 1:N
if isequal(species{p},'versicolor')==1
originaldata(p,5)=1;
elseif isequal(species{p},'virginica')==1
originaldata(p,5)=2;
end
end

[discrete,discretizationset]= CACC_Discretization(originaldata,1)

Comment only
17 Feb 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Prachitee Shekhawat

hi,
can we apply this algorithm to classification dataset?I hav applied it on iris dataset(containing 4 attribute + 1 class attribute with 3 classes) but it is only converting 2 continuous attributes to discrete while two remains the same.
I have invoke the CACC_Discretization function as
[discrete,discretizationset]= CACC_Discretization(originaldata,3)
here originaldata is my iris dataset and 3 is number of classes in which data is classified.
I think i m not getting the second input variable.
Please help me out.

Comment only
12 Feb 2011 Maximum(minimum) Weight Spanning Tree ( Directed ) For learning "Directed Maximum Spanning Tree", Chu-Liu/Edmonds Algorithm is implemented here. Author: Guangdi Li

Guangdi Li (view profile)

Amir

Amir (view profile)

I have checked the bioinformatic toolbox but it did not install. Could you please tell me how can I add this toolbox to Matlab?

Comment only
11 Feb 2011 Maximum(minimum) Weight Spanning Tree ( Directed ) For learning "Directed Maximum Spanning Tree", Chu-Liu/Edmonds Algorithm is implemented here. Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

Please check your Bioinformatic toolbox :)

Comment only
11 Feb 2011 Maximum(minimum) Weight Spanning Tree ( Directed ) For learning "Directed Maximum Spanning Tree", Chu-Liu/Edmonds Algorithm is implemented here. Author: Guangdi Li

Guangdi Li (view profile)

Amir

Amir (view profile)

Hi,
When I want to run it in matlab under Linux (R2009a)
it happens an error :

Undefined function or method 'biograph' for input arguments of type 'double'.

Error in ==> DirectedMaximumSpanningTree at 31
[ CNumber, Component ] = conncomp( biograph( TreeMatric ),'Weak', true );

Would you please help me in this error?

Comment only
01 Feb 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Adrian__

Thank you very much for your help.
Now is working perfectly.

5
31 Jan 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Adrian__

Hello,

I am most appreciative for your help.
I just hope that the database I sent you does not violate any of the algorithm's requirements.

Should this be the problem , I apologize in advance for wasting your time.

Comment only
28 Jan 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

Thanks for Dubuis's scrutiny. Indeed, If Sig=1, then variables in XVector and YVector are significantly associate. Concerning Nick's question about help section, i will learn how to do it soon. For the 2nd question about two sides p-value, I am sorry that I wrote the code learning from the Wolfram website. If you can show me the equations for two side, I would be very happy to improve the code. Thanks for your comments.

Comment only
28 Jan 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Guangdi Li

Guangdi Li (view profile)

Of course, you are welcome to send me the dataset to check what's the problem.

Comment only
28 Jan 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

Guangdi Li (view profile)

Nick Mariette

The help section of the function code should be prepared properly to show the usage (including inputs and outputs) when you type:
help FisherExactTest

It should not be necessary to inspect the code, or the code in a secondary function (i.e ControlCentor.m [sic]).

Secondly, the functionality seems correct but somewhat incomplete.

When I use the example from the Wolfram website, it gives the same result as the website and the other two Fisher test functions on FileExchange (myfisher and Fisherextest). However it only gives one sided p-value, not both tails, which are provided by those other two functions.

3
27 Jan 2011 Discretization algorithms: Class-Attribute Contingency Coefficient To discrete continuous data, CACC is a promising discretization scheme proposed in 2008 Author: Guangdi Li

Guangdi Li (view profile)

Adrian__

Hello,

Thank you very much for this code; I found it very useful when working with my dataset.

However , I must confess that I got the same error message Khadil was talking about when I tried to discretize a subset of my original database.

Strange is the fact that for different subsets no error is returned while for others the simulation is stopped by the aforementioned error.

Could you please let me know what is causing the problem?

Should you need a sample of the database I was talking about, I will email it to you as soon as you agree.

Comment only

Contact us