K-means algorithm sometimes doesn't converge, help

  • Topic Archived
You're browsing the GameFAQs Message Boards as a guest. Sign Up for free (or Log In if you already have an account) to be able to post messages, change how messages are displayed, and view media in posts.
  1. Boards
  2. Game Design and Programming
  3. K-means algorithm sometimes doesn't converge, help

User Info: General_Zimbad

General_Zimbad
3 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.

User Info: General_Zimbad

General_Zimbad
3 years ago#2
On a side note, going to bed. Won't be able to answer questions for a bit.

User Info: General_Zimbad

General_Zimbad
3 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