havBpNet:J

All Packages  Class Hierarchy  This Package  Previous  Next  Index

havBpNet:J Home Page

Class havNN.havBpNet.havBpSinNode

java.lang.Object
   |
   +----havNN.havBpNet.havBpNode
           |
           +----havNN.havBpNet.havBpSinNode

public class havBpSinNode
extends havBpNode
The havBpSinNode class implements a node that uses a Sin transfer function.

Version:
1.1(java) 1/1/98

Constructor Index

 o havBpSinNode(int)
Standard constructor.
 o havBpSinNode(StreamTokenizer)
The restore constructor.

Method Index

 o CalculateError()
Calculate node's error.
 o Cycle()
Feed forward processing.

Constructors

 o havBpSinNode
 public havBpSinNode(int l_type)
Standard constructor.

Parameters:
l_type - The layer type (havINPUT, havHIDDEN, havOUTPUT) of the node's parent layer.
 o havBpSinNode
 public havBpSinNode(StreamTokenizer in) throws IOException
The restore constructor.

Parameters:
in - The opened and positioned SAVE file.
Throws: IOException
if any IO Errors occur.

Methods

 o Cycle
 public void Cycle()
Feed forward processing. The activation value is calculated as...

              y = SUM(W[i] * X[i])    ; i = 0, n
 

V = f(y) = sin(y)

... where y = total (raw) input to the node n is the index of the last input of the node V is the final activition value of the node W[i] is the node's ith input weight X[i] is the activation value of the node's ith input

Overrides:
Cycle in class havBpNode
 o CalculateError
 public void CalculateError()
Calculate node's error. Error is calculated differently depending on whether the node is in an havHIDDEN or havOUTPUT Layer.

In an havOUTPUT layer, the node's error is simply the difference between the node's expected and activation values multiplied by the derivative of the Sin function. If the resulting value is below the node's error threshold, then the node's error is set to 0.0.

In an havHIDDEN layer, the node's error is calculated as the sum of the weighted errors in the node's output nodes multiplied by the derivative of the Sin function as follows...

                E = SUM(W[i] * O[i]) * f'(f(y))   ; i = 0, n
 

... where E is the node's final calculated error n is the index of the last output of the node W[i] is the weight between the node and it's ith output O[i] is the error of the node's ith output y is the node's total input value (raw) f(y) is the node's activation value f'(f(y)) is the derivative of the node's activation value such that...

f'(f(y)) = cos(y)

Overrides:
CalculateError in class havBpNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Copyright © 1998 by hav.Software. All Rights Reserved.