1

I'm using Weka multilayer-perceptron classifier to do classifications. I want to know after exactly how many epochs the neural network converges (weights don't update any more).

I'm using its Java API, but I cannot figure out a way to get the weight variables and test whether they're still changing or not in a loop.

double-beep
  • 5,031
  • 17
  • 33
  • 41
J Freebird
  • 3,664
  • 7
  • 46
  • 81

1 Answers1

1

From NeuralNode:

  /**
   * call this function to get the change in weights array.
   * This will also allow the change in weights to be updated.
   * @return The change in weights array.
   */
  public double[] getChangeInWeights() {
    return m_changeInWeights;
  }

If you go to where your Weka folder is, you can extract the source code for Weka from weka-src.jar. This was in: /src/main/java/weka/classifiers/functions/neural/NeuralNode.java.

Steve P.
  • 14,489
  • 8
  • 42
  • 72