NeuralMethod.java
Upload User: rhdiban
Upload Date: 2013-08-09
Package Size: 15085k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Java

  1. /*
  2.  *    This program is free software; you can redistribute it and/or modify
  3.  *    it under the terms of the GNU General Public License as published by
  4.  *    the Free Software Foundation; either version 2 of the License, or
  5.  *    (at your option) any later version.
  6.  *
  7.  *    This program is distributed in the hope that it will be useful,
  8.  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10.  *    GNU General Public License for more details.
  11.  *
  12.  *    You should have received a copy of the GNU General Public License
  13.  *    along with this program; if not, write to the Free Software
  14.  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  */
  16. /*
  17.  *    NeuralMethod.java
  18.  *    Copyright (C) 2001 Malcolm Ware
  19.  */
  20. package weka.classifiers.functions.neural;
  21. import java.io.*;
  22. /**
  23.  * This is an interface used to create classes that can be used by the 
  24.  * neuralnode to perform all it's computations.
  25.  *
  26.  * @author Malcolm Ware (mfw4@cs.waikato.ac.nz)
  27.  * @version $Revision: 1.4 $
  28.  */
  29. public interface NeuralMethod extends Serializable {
  30.   
  31.   /**
  32.    * This function calculates what the output value should be.
  33.    * @param node The node to calculate the value for.
  34.    * @return The value.
  35.    */
  36.   double outputValue(NeuralNode node);
  37.   /**
  38.    * This function calculates what the error value should be.
  39.    * @param node The node to calculate the error for.
  40.    * @return The error.
  41.    */
  42.   double errorValue(NeuralNode node);
  43.   /**
  44.    * This function will calculate what the change in weights should be
  45.    * and also update them.
  46.    * @param node The node to update the weights for.
  47.    * @param learn The learning rate to use.
  48.    * @param momentum The momentum to use.
  49.    */
  50.   void updateWeights(NeuralNode node, double learn, double momentum);
  51. }