<$BlogRSDUrl$>

Thursday, December 18, 2003

Thanks for a fun semester. I won't check this weblog anymore but feel free to email me anytime. Happy holidays! D.

Monday, December 15, 2003

I mean in R

See this document: http://cran.r-project.org/doc/manuals/R-data.pdf
This has complete details about getting data into and out of R. D.

Dr.Madigan,
My output is too much to be displaied in one screen, could you show me how to put the output into a file so that i can save them and open later to watch the result?

I am at NSF in Washington this week. I will try to respond to questions via email. D.
i want to meet to today to discuss about my project . please let me know when will be a good time...
thank you
soundharrajan

Sunday, December 14, 2003

professor
i have sent you my project via email. please have a look into it.. and let me know if i am doing it rite...
thank you for your time
soundharrajan
THANK YOU PROFESSOR

Saturday, December 13, 2003

professor
this is the formula for BIC =-2loglik+Log(N).d
ca u let me know wht does N and d stand for?????? . i need for my project???
thank you for ur time

N is the sample size and d is the dimensionality of the model (i.e., the number of parameters in the model). D.
I also want to thank you for the class. It was great!!

Thanks. What did y'all think of the student presentations? Was that useful? They were pretty sparsely attended at the end. D.

Thursday, December 11, 2003

Hi, is there anyone doing project on Data squashing? I'd like to discuss it with you. Thanks! Please email back by fuyaonv@hotmail.com asap!

Wednesday, December 10, 2003

Dr. Madigan,

Just wanted to send a quick thank you for all the effort, preparation, and enthusiasm you brought to teaching your class on mining. Greatly appreciated the course!

Tuesday, December 09, 2003

At 5pm today I will be in or near the classroom. We will have a couple of student presentations starting at around 5:20pm. D.

Monday, December 08, 2003

Thanks professor, Also could you comment on :

Should the EM algorithm be very sensitive to the initial values of mu1, mu2, sigma1sq, sigma2sq. In two different posts you have usggested two sets of values:
1.#pi=0.6, mu1=0, mu2=4, sigma1=1, sigma2=4.
2.#pi=0.6, mu1=4, mu2=1,sigma1=1, sigma2=2

Although Both dont vary the final plots but the value of mu1 in the 1st case(#pi=0.6, mu1=0, mu2=4, sigma1=1, sigma2=4. ) becomes negative



Case 1 converges to:

itr= 43 mu0= -1.019412 var0= 0.9207163 mu1= 3.528267 var1= 1.730074 pi= 0.8314063

Case 2 converges to:

itr= 104 mu0= 3.528267 var0= 1.730074 mu1= -1.019412 var1= 0.9207161 pi= 0.1685937

These answers are identical (the labelling of the components is arbitrary). D.

Should the EM algorithm be very sensitive to the initial values of mu1, mu2, sigma1sq, sigma2sq. In two different posts you have usggested two sets of values:
1.#pi=0.6, mu1=0, mu2=4, sigma1=1, sigma2=4.
2.#pi=0.6, mu1=4, mu2=1,sigma1=1, sigma2=2
Although Both dont vary the final plots but the value of mu1 in the 1st case(#pi=0.6, mu1=0, mu2=4, sigma1=1, sigma2=4. ) becomes negative
according to your previous post the values should not be negative, does this depend on the initial value or regardless of that the value the mu, sigma, log likelihood etc should be positive.

Also if you observe the graph on page236 (fig 8.6) the log likelihood is negative.Did you only mean mu, sigma and pi should be positive but log likelihood can be negative.

The mu's can certainly be negative, the sigma's should never be negative, and the log-likelihood is always negative. In the post below I was specifically referring to the expression (1-Pi)*Phitheta1*Y(i))+(Pi*PhiTheta2*Y(i)) which cannot be negative. D.




I'd like to do a couple of the student presentations in the 5pm session this week. Let me know if you want to do this. D.

Sunday, December 07, 2003

Professor,

I used formula 8.40 to calculate the likelihood .But when I plot the graph for log likelihood it does stabilise but it is reducing in value.Just the reverse of the graph from the book.
ALso plotted the graph of Pi against iteration no. and it looks similar to the graph in the book, that is stabilises and the value gradually increases.

However when I tried to use 8.39 to calculate the log likelihood sometimes the value of
(1-Pi)*Phitheta1*Y(i))+(Pi*PhiTheta2*Y(i)) comes as negative.

How can it be negative? None of those terms should be negative so there must be a bug somewhere, right?

As a result ;log((1-Pi)*Phitheta1*Y(i))+(Pi*PhiTheta2*Y(i))) is not possible to calculate.

I assume that we have to use formula 8.39 instead of 8.40

The graph of 8.40 (with gamma's in place of the delta's) looks very similar to the picture for 8.39. (As it should - one is the expected value of the other.)

Am I doing something wrong here?

Thank you,



Saturday, December 06, 2003

Professor,

Can we use formula 8.39 in text book to compute log-likelihood?

Yes.

what is the difference between 8.39 and 8.40?

8.40 gives the log-likelihood when you know the mixture component that each observation came from.

The text book says because direct maximization of fomula 8.39 is difficult numerically, so we can use 8.40 which is a simpler approach. but it does not matter when we use computer to do it, right?

8.40 together with 8.41 give you an expected likleihood - that's what maximimzed in the EM algorithm.

why in your slides (slide number 16), the log-likelihood fomula has two parts (I mean two summations), formula 8.40 only has one part? It seems that they have the same first part.

In later printings of the book, 8.40 has two parts. The slides are correct. Note the log-likelihood in Figure 8.6 is using formula 8.39. D.

Thanks

Thursday, December 04, 2003

Professor,

We guess the value of Sigma1Square and Sigma2Square for 1st iteration and calculate them in the next iteration onwards.
When we calculate PhiTheta , in the formual of normal density , Sigma1 is equal to square root of the value of Sigma1Square and so on for Sigma2?

Thank you

Yes, what you are saying is correct I think. D.
The final graph that is plotted is between the log likelihood and the iterations?
In this case how do we get the log likelihood ?
Thanks

CORRECTION: Its formula 8.39. D.
Professor,

Is there any function available in perl or PDL which can calculate normal density?

PDL has a normal density function but its just as easy to write your own.

Otherwise if we calculate on our own then with the formula:
(1/sigma*Root2Pi)*e-1/2*(y-Mu/sigma)2

Correct

which values of mu & sigma should we take?

mu and sigma for the two components vary from one iteration to the next and are specified as part of the algorithm on page 238.

Also there are 50 data points.Does it mean we do 50 iteration each time?

What do you mean "50 iteration each time"? The number of EM iterations doesn't have anything to with the sample size. D.
Thank you
professor
i would like to know by when do we have to submit our projects.

5pm December 18th, preferably via email. D.

Wednesday, December 03, 2003

If you want multiple graphics windows in R, just do "windows()" before you issue your plot command. That causes a new window to open.
Professor,
Could you provide a piece of Perl code showing how to read data from a dataset (say, a .dbf, or .xls file) to arrays in Perl, each array representing a variable, like @array1 is var1, @array2 is var2... ? Thank you!!!!

.dbf or .xls files have a very specialized format that I have no idea how to parse. If you have your data in a tab-delimited text file then its just:

open(MYFILE,"blah.txt");
$lineCount = 0;
while (<MYFILE>) {
chomp;
@temp = split "\t";
$array1[$lineCount] = $temp[0];
$array2[$lineCount] = $temp[1];
etc.
$lineCount++;
}


Dear Professor,
I am interested in the clustering algorithm used for image segmentation. So I have two questions about it.
1.What's the 'best' algorithm you have ever seen for image data, especially for medical image? How about model-based clustering?

I don't know much about image segmentation. Model-based clustering has been used successfully. See, for example, http://www.stat.washington.edu/tech.reports/tr325.ps

2.Any other good standard to calculate the difference for a term of data except for variance considering some outliers and noise?

What do you mean "difference for a term of data"? D.
Thanks!

Tuesday, December 02, 2003

Dear Professor,

Can you update the ppt files on the web and add the text categorization one?

Thanks!

I updated the clustering slides. I'll add the text cat. slides later. D.
Dear professor,

Can we have a discussion on the steps & procedures for the 2nd homework in class today?

Thanks

Lets do this before class. D.
Do we have a class today at 5PM ? I saw an earlier post where it was mentioned that we might discuss the implementation of the hw problem in R
thanks

I'll be the classroom at 5pm (or a room nearby). D.
How many iterations is it taking to you?
I guess I may be doing something wrong because I always get different values (conveges but very slowly).

Should be less than 200, maybe a lot less if the starting point is good. D.

This page is powered by Blogger. Isn't yours?