View Single Post
  #6  
Old 03-15-2013, 07:00 PM
boulis boulis is offline
Member
 
Join Date: Feb 2013
Location: Sydney, Australia
Posts: 29
Default Re: on the right track?

Quote:
Originally Posted by Sendai View Post
Since probably most of us are writing our own regular RBF implementations by hand, I thought it would be helpful to compare the results of a couple simple test cases to make sure our implmentations are correct.
data set = (0, 0) (0, 1) (1, 0) (1, 1)
labels = 1 -1 -1 1
centers = (0, 0.2) (1, 0.7)
I assume you mean that the centres are given as such and they are not computed by Lloyd's algorithm.
I believe that Lloyd's algorithm would produce unstable results with this configuration of points and number of centers.
Indeed, these are the 3 different cases that I get from running my algorithm (the results depend on the random starting point of course):

centres = [[ 0., 0.], [ 0.66666667, 0.66666667]]
clusters = [[[0, 0]], [[0, 1], [1, 0], [1, 1]]]

centres = [[ 0.66666667, 0.33333333], [ 0., 1.]]
clusters = [[[0, 0], [1, 0], [1, 1]], [[0, 1]]]

centres = [[ 1. , 0.5], [ 0. , 0.5]]
clusters = [[[1, 0], [1, 1]], [[0, 0], [0, 1]]]

These seem pretty reasonable to me. Do other people get the same results?
Reply With Quote