Talk:Perceptron

From Rosetta Code
Revision as of 04:10, 16 July 2016 by Rdm (talk | contribs) (→‎How long does that java implementation need?: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How long does that java implementation need?

Looking at the current java implementation, I see, in the paint event:

<lang java> train(training[count].inputs, training[count].answer);

       count = (count + 1) % training.length;

       g.setStroke(new BasicStroke(1));
       g.setColor(Color.black);
       for (int i = 0; i < count; i++) {</lang>

So, I believe count is initially zero, and it looks like each time through the paint event there's training against one element of the training set. And, it's got a timer doing a repaint every 30 milliseconds. So it's a bit over a minute to do one pass against the training set of 2000 elements, and then it will keep training indefinitely.

It would be helpful to know how long the java implementation had to "cook" before that screenshot was taken... --Rdm (talk) 04:10, 16 July 2016 (UTC)