K-means algorithm sometimes doesn't converge, help

  • Topic Archived
  1. Boards
  2. Game Design and Programming
  3. K-means algorithm sometimes doesn't converge, help
2 years ago#1
http://pastebin.com/wsutz5an

It's in matlab. I am not used to matlab so sorry on the terrible quality. The main issue is that it fails to converge when the input data gets too big (data > 100 elements), especially when it's given > 2 clusters. The data must be given as a 2 by n matrix, where the two columns represent the x values and y values respectively.

Not even sure if is correct, but I think it should be.
2 years ago#2
On a side note, going to bed. Won't be able to answer questions for a bit.
2 years ago#3
Disregard this. Found out my implementation of the algorithm works fine. I was just being an idiot and testing it with randomly generated data with no clusters.
  1. Boards
  2. Game Design and Programming
  3. K-means algorithm sometimes doesn't converge, help

Report Message

Terms of Use Violations:

Etiquette Issues:

Notes (optional; required for "Other"):
Add user to Ignore List after reporting

Topic Sticky

You are not allowed to request a sticky.

  • Topic Archived