com.rapidminer.operator.learner.functions.neuralnet
Class Node
java.lang.Object
com.rapidminer.operator.learner.functions.neuralnet.Node
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- InnerNode, InputNode, OutputNode
public abstract class Node
- extends java.lang.Object
- implements java.io.Serializable
A node is the abstract superclass for all types of neural net nodes and also represents
the connection between other nodes of the neural net. It performs
most of the calculations and the feedforward / backpropagation mechanism.
- Author:
- Ingo Mierswa, Sebastian Land
- See Also:
- Serialized Form
|
Constructor Summary |
Node(java.lang.String nodeName,
int layerIndex,
int nodeType)
|
|
Method Summary |
boolean |
areWeightsUpdated()
|
abstract double |
calculateError(boolean calculate,
Example example)
Calculates the error for this node. |
abstract double |
calculateValue(boolean calculate,
Example example)
Calculates the output for this node. |
static boolean |
connect(Node firstNode,
Node secondNode)
|
protected boolean |
connectInput(Node inputNode,
int inputNodeOutputIndex)
|
protected boolean |
connectOutput(Node outputNode,
int outputNodeInputIndex)
|
static boolean |
disconnect(Node firstNode,
Node secondNode)
|
protected boolean |
disconnectInput(Node inputNode,
int inputNodeOutputIndex)
|
protected boolean |
disconnectOutput(Node outputNode,
int outputNodeInputIndex)
|
int[] |
getInputNodeOutputIndices()
|
Node[] |
getInputNodes()
|
int |
getLayerIndex()
|
java.lang.String |
getNodeName()
|
int |
getNodeType()
|
int[] |
getOutputNodeInputIndices()
|
Node[] |
getOutputNodes()
|
double |
getWeight(int n)
Returns 1. |
void |
reset()
|
void |
update(Example example,
double learningRate,
double momentum)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INPUT
public static final int INPUT
- See Also:
- Constant Field Values
HIDDEN
public static final int HIDDEN
- See Also:
- Constant Field Values
OUTPUT
public static final int OUTPUT
- See Also:
- Constant Field Values
inputNodes
protected Node[] inputNodes
outputNodes
protected Node[] outputNodes
inputNodeOutputIndices
protected int[] inputNodeOutputIndices
outputNodeInputIndices
protected int[] outputNodeInputIndices
currentValue
protected double currentValue
currentError
protected double currentError
Node
public Node(java.lang.String nodeName,
int layerIndex,
int nodeType)
calculateValue
public abstract double calculateValue(boolean calculate,
Example example)
- Calculates the output for this node.
calculateError
public abstract double calculateError(boolean calculate,
Example example)
- Calculates the error for this node.
getWeight
public double getWeight(int n)
- Returns 1. Subclasses should overwrite this method.
getLayerIndex
public int getLayerIndex()
getNodeName
public java.lang.String getNodeName()
getNodeType
public int getNodeType()
update
public void update(Example example,
double learningRate,
double momentum)
areWeightsUpdated
public boolean areWeightsUpdated()
reset
public void reset()
getInputNodes
public Node[] getInputNodes()
getOutputNodes
public Node[] getOutputNodes()
getInputNodeOutputIndices
public int[] getInputNodeOutputIndices()
getOutputNodeInputIndices
public int[] getOutputNodeInputIndices()
connectInput
protected boolean connectInput(Node inputNode,
int inputNodeOutputIndex)
connectOutput
protected boolean connectOutput(Node outputNode,
int outputNodeInputIndex)
disconnectInput
protected boolean disconnectInput(Node inputNode,
int inputNodeOutputIndex)
disconnectOutput
protected boolean disconnectOutput(Node outputNode,
int outputNodeInputIndex)
connect
public static boolean connect(Node firstNode,
Node secondNode)
disconnect
public static boolean disconnect(Node firstNode,
Node secondNode)
Copyright © 2001-2009 by Rapid-I