3 ms·
But you can. Get the distance to all your centroids, assign to closest centroid, update centroid location. The distance function can be anything.
by isoprophlex 5y ago
But you can. Get the distance to all your centroids, assign to closest centroid, update centroid location.
The distance function can be anything.
- globular-toast 5y agoWhat's a centroid? It's the point that minimises the sum of squared Euclidean distances between itself and every point in the cluster.
- isoprophlex 5y agoIt's a tuple of floats that you move slightly towards the closest point it has just seen, optionally with some rate of forgetting. You shuffle your big ass wad of data, and loop over each element doing the above, optionally decreasing the forgetting rate. You track the location of your centroids and if your data / loss fn isn't too pathological, they won't misbehave too badly and you have handwavey assurance of convergence... Definitions be damned.
- civilized 5y agoSo, you made up your own algorithm that is kinda like k-means, this algorithm might sometimes work, and this shows that k-means works in non-Euclidean spaces?