Submitted by _throw_hawaii t3_11eg41z in MachineLearning
[removed]
Submitted by _throw_hawaii t3_11eg41z in MachineLearning
[removed]
The result of k-means clustering is a set of cluster centers. Usually, I would think "running" it over new data would mean assigning each observation in the new set to one of those clusters. I'm not sure what the rest of your question is getting at.
Yes, sorry you're right. I meant that the k-means was originally applied (and optimized) to an initial dataset. Then those data have been updated, but the structure of the model has to stay the same(except for some parameters in the code)
Yes, exactly. The maximum number of iterations is a parameter that can be usually set in some functions(in programming languages). So I was told when I had to implement the model with k-means on new data to set that number to zero
Basically, k-means is an algorithm. You give it data and the number of clusters you want to find in the data. It finds these clusters and returns their centers (known as centroids) and possibly assigns each data point to a cluster. "Optimizing" a k-means algorithm doesn't make much sense, IMO. What you probably want to say is that you ran the algorithm and got some centroids.
If you run k-means with new data but tell it to use particular centroids (that you got from a previous run of k-means), then it'll use these centroids as starting points and update them to match the new data.
Basically, k-means will adjust the centroids you give it in such a way that these centroids define clusters that describe your data well enough. When you run k-means with no centroids, it'll generate random centroids for you.
Thank you so much, so clear and helpful!!!🙏🙏🙏
Using known centroids should be more stable . K-means can be stochastic for starting clusters and the result for the same data can vary.
This sounds like you are being asked to assign the new data to a cluster. Assignment is as simple as calling the distance function for each pair of point and centroid. The minimum score is the cluster assignment.
ForceBru t1_jaduboq wrote
What do you mean by "trained k-means algorithm"? K-means is an algorithm, there's nothing to "train" there. I guess you could fine-tune the number of iterations and the number of clusters somehow. Is this what you mean?
What do you mean by "training seeds"? Are these cluster centroids obtained after clustering training data?