shiffman/Machine-Learning-Processing

Classifying points inside or outside of a circle fails

shiffman opened this issue · 1 comments

Currently I'm classifying left or right side of the window which works beautifully.

      if (x > 300) {
        inst.setValue(ca, 0);
      } else {
        inst.setValue(ca, 1);
      }

screen shot 2016-07-27 at 5 46 50 pm

If I change the classification as follows:

      float d = dist(x, y, width/2, height/2);
      if (d > 200) {
        inst.setValue(ca, 0);
      } else {
        inst.setValue(ca, 1);
      }

I get strange results.

screen shot 2016-07-27 at 5 49 16 pm

Ok, the MLP is not well-suited for the circle problem. Works nicely with nearest neighbor.

    ibk = new IBk();
    ibk.buildClassifier(training);

screen shot 2016-07-27 at 10 20 47 pm

5fd24cd