LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > The Final

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2012, 05:34 PM
DavidNJ DavidNJ is offline
Member
 
Join Date: Jul 2012
Posts: 28
Default How Many Iterations to Pick Best K-Cluster?

To pick the best set of K-Means clusters centroids for each training set, how many times should be generate the centroids to find the best? 10? 100? 1000? The higher number provides the higher probability of finding the the centroids with the lowest Eout.

Thanks,

David
Reply With Quote
  #2  
Old 09-17-2012, 06:00 PM
MLearning MLearning is offline
Senior Member
 
Join Date: Jul 2012
Posts: 56
Default Re: How Many Iterations to Pick Best K-Cluster?

Quote:
Originally Posted by DavidNJ View Post
To pick the best set of K-Means clusters centroids for each training set, how many times should be generate the centroids to find the best? 10? 100? 1000? The higher number provides the higher probability of finding the the centroids with the lowest Eout.

Thanks,

David
You need a condition that stops iteration when the centroids do not change.
Reply With Quote
  #3  
Old 09-17-2012, 06:31 PM
DavidNJ DavidNJ is offline
Member
 
Join Date: Jul 2012
Posts: 28
Default Re: How Many Iterations to Pick Best K-Cluster?

Different problem If you start with different initial centroids you get different results. If you run it enough you can materially change Ein and Eout because of a better centroid result.

By itself K-means clustering doesn't guarantee an optimal result although it reaches a stable result quickly (especially with so few data points).
Reply With Quote
  #4  
Old 09-17-2012, 08:05 PM
MLearning MLearning is offline
Senior Member
 
Join Date: Jul 2012
Posts: 56
Default Re: How Many Iterations to Pick Best K-Cluster?

Quote:
Originally Posted by DavidNJ View Post
Different problem If you start with different initial centroids you get different results. If you run it enough you can materially change Ein and Eout because of a better centroid result.

By itself K-means clustering doesn't guarantee an optimal result although it reaches a stable result quickly (especially with so few data points).
I agree that K-means clustering is locally optimal.
Reply With Quote
  #5  
Old 09-18-2012, 12:06 AM
rainbow rainbow is offline
Member
 
Join Date: Jul 2012
Posts: 41
Default Re: How Many Iterations to Pick Best K-Cluster?

It was mentioned in lectures that you in general should try different initilizations.

However, I didn't do this... I just started with K random real data points. This strategy favours the SVM model when we compare classification performance, but since we execute the experiment many times this type of bias should be diminishing.
Reply With Quote
  #6  
Old 09-18-2012, 04:37 AM
DavidNJ DavidNJ is offline
Member
 
Join Date: Jul 2012
Posts: 28
Default Re: How Many Iterations to Pick Best K-Cluster?

I'm getting a difference of two letters in the answer between using the first k-means cluster returned and testing 50 clusters per training data set.

If I can't get an official answer....those who submitted the correct answer, was it one iteration or a high number of iterations to choose the centroids for RBF?
Reply With Quote
  #7  
Old 09-18-2012, 06:46 AM
JohnH JohnH is offline
Member
 
Join Date: Jul 2012
Posts: 43
Default Re: How Many Iterations to Pick Best K-Cluster?

Each experiment should start with a random selection of points without regard to the data set. Lloyd's algorithm is then applied to these points to discover a set of centroids. This is unsupervised learning; i.e., the training data labels are not considered. It is not intended that one should find the optimal centroids, only that one finds some set of k-means clusters.
Reply With Quote
  #8  
Old 09-18-2012, 06:53 AM
DavidNJ DavidNJ is offline
Member
 
Join Date: Jul 2012
Posts: 28
Default Re: How Many Iterations to Pick Best K-Cluster?

The location of the centroids is fully dependent on the training data. Lloyd's algorithm doesn't find an optimal solution; K-means clustering requires multiple centroid selections to determine the best fit. This reduces the 'luck' in your initial random centroid selections.
Reply With Quote
  #9  
Old 09-18-2012, 08:36 AM
yaser's Avatar
yaser yaser is offline
Caltech
 
Join Date: Aug 2009
Location: Pasadena, California, USA
Posts: 1,475
Default Re: How Many Iterations to Pick Best K-Cluster?

Quote:
Originally Posted by DavidNJ View Post
If I can't get an official answer....those who submitted the correct answer, was it one iteration or a high number of iterations to choose the centroids for RBF?
The problem specifies that each run starts with random centers, and the only time they are revised (starting with another set of random centers) is when one of the clusters becomes empty during the iterations of Lloyd's algorithm.

There are different approaches to choosing the centers that may lead to different performance. The above approach is the one used in this problem.
__________________
Where everyone thinks alike, no one thinks very much
Reply With Quote
  #10  
Old 09-18-2012, 10:54 AM
DavidNJ DavidNJ is offline
Member
 
Join Date: Jul 2012
Posts: 28
Default Re: How Many Iterations to Pick Best K-Cluster?

Oops...less than an hour and I have to rerun all 5...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:35 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.