yawn.nn.mlp
Class PerceptronNode

java.lang.Object
  extended by yawn.nn.NeuralNode
      extended by yawn.nn.mlp.PerceptronNode
Direct Known Subclasses:
LinearNode, SigmoidNode

public abstract class PerceptronNode
extends NeuralNode

This is part of the yawn project. $Id: PerceptronNode.java,v 1.10 2005/04/07 17:28:07 supermarti Exp $

Version:
$Revision: 1.10 $
Author:
Luis Martí (luis dot marti at uc3m dot es)

Field Summary
protected  double maxWeightValue
           
protected  double minWeightValue
           
protected  Pattern momentum
           
protected  Pattern weights
           
 
Fields inherited from class yawn.nn.NeuralNode
input, inputSize
 
Constructor Summary
PerceptronNode()
           
PerceptronNode(int inputSize)
           
 
Method Summary
protected  double activationFunction(Pattern input)
           
 void adapt(double delta, double learningRate, double momentumRate)
          Adapt the weights using the delta rule.
 double calculateHiddenLayerDelta(Pattern nextLayerDeltas, Pattern nextLayerWeights)
          Calculate the deltas using the subsequent layer deltas and the weights emmanent from this node.
 double calculateOutputLayerDelta(double expected)
           
protected abstract  double df(double x)
           
protected abstract  double f(double x)
           
 double getMaxWeightValue()
           
 double getMinWeightValue()
           
 Pattern getWeights()
           
 void setInputSize(int inputSize)
           
 void setMaxWeightValue(double maxWeightValue)
           
 void setMinWeightValue(double minWeightValue)
           
 void setWeights(Pattern weights)
           
 
Methods inherited from class yawn.nn.NeuralNode
getInputSize, output, reset, setInput, setInputElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weights

protected Pattern weights

momentum

protected Pattern momentum

minWeightValue

protected double minWeightValue

maxWeightValue

protected double maxWeightValue
Constructor Detail

PerceptronNode

public PerceptronNode(int inputSize)
Parameters:
inputSize -

PerceptronNode

public PerceptronNode()
Method Detail

setInputSize

public void setInputSize(int inputSize)
Overrides:
setInputSize in class NeuralNode

activationFunction

protected double activationFunction(Pattern input)
Specified by:
activationFunction in class NeuralNode

getWeights

public Pattern getWeights()
Returns:
the weigths of this node

setWeights

public void setWeights(Pattern weights)
Parameters:
weights -

f

protected abstract double f(double x)

df

protected abstract double df(double x)

adapt

public void adapt(double delta,
                  double learningRate,
                  double momentumRate)
Adapt the weights using the delta rule.

Parameters:
delta -
learningRate -

calculateOutputLayerDelta

public double calculateOutputLayerDelta(double expected)

calculateHiddenLayerDelta

public double calculateHiddenLayerDelta(Pattern nextLayerDeltas,
                                        Pattern nextLayerWeights)
Calculate the deltas using the subsequent layer deltas and the weights emmanent from this node.

Parameters:
nextLayerDeltas - the deltas of the next layer
nextLayerWeights - the weights of the connections emaning from this node
Returns:
the value of this node's delta

getMaxWeightValue

public double getMaxWeightValue()
Returns:
Returns the maxWeightValue.

setMaxWeightValue

public void setMaxWeightValue(double maxWeightValue)
Parameters:
maxWeightValue - The maxWeightValue to set.

getMinWeightValue

public double getMinWeightValue()
Returns:
Returns the minWeightValue.

setMinWeightValue

public void setMinWeightValue(double minWeightValue)
Parameters:
minWeightValue - The minWeightValue to set.


Copyright © 2003-2005 GIAA, Universidad Carlos III de Madrid. All Rights Reserved.