protected class MultilayerPerceptron.NeuralEnd extends NeuralConnection
CONNECTED, INPUT, m_id, m_inputList, m_inputNums, m_numInputs, m_numOutputs, m_outputList, m_outputNums, m_type, m_unitError, m_unitValue, m_weightsUpdated, m_x, m_y, OUTPUT, PURE_INPUT, PURE_OUTPUT, UNCONNECTED| Constructor and Description |
|---|
NeuralEnd(java.lang.String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
drawHighlight(java.awt.Graphics g,
int w,
int h)
Call this function to draw the node highlighted.
|
void |
drawNode(java.awt.Graphics g,
int w,
int h)
This will draw the node id to the graphics context.
|
double |
errorValue(boolean calculate)
Call this to get the error value of this unit, which in this case is the difference between the
predicted class, and the actual class.
|
int |
getLink() |
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
onUnit(java.awt.Graphics g,
int x,
int y,
int w,
int h)
Call this function to determine if the point at x,y is on the unit.
|
double |
outputValue(boolean calculate)
Call this to get the output value of this unit.
|
void |
reset()
Call this to reset the value and error for this unit, ready for the next run.
|
void |
restoreWeights()
Call this to have the connection restore from the saved weights.
|
void |
saveWeights()
Call this to have the connection save the current weights.
|
void |
setLink(boolean input,
int val)
Call this function to set What this end unit represents.
|
allocateInputs, allocateOutputs, changeInputNum, changeOutputNum, connect, connectInput, connectOutput, disconnect, disconnectInput, disconnectOutput, drawInputLines, drawOutputLines, getId, getInputNums, getInputs, getNumInputs, getNumOutputs, getOutputNums, getOutputs, getType, getX, getY, removeAllInputs, removeAllOutputs, setType, setX, setY, updateWeights, weightValuepublic boolean onUnit(java.awt.Graphics g,
int x,
int y,
int w,
int h)
onUnit in class NeuralConnectiong - The graphics context for font size info.x - The x coord.y - The y coord.w - The width of the display.h - The height of the display.public void drawNode(java.awt.Graphics g,
int w,
int h)
drawNode in class NeuralConnectiong - The graphics context.w - The width of the drawing area.h - The height of the drawing area.public void drawHighlight(java.awt.Graphics g,
int w,
int h)
drawHighlight in class NeuralConnectiong - The graphics context.w - The width of the drawing area.h - The height of the drawing area.public double outputValue(boolean calculate)
outputValue in class NeuralConnectioncalculate - True if the value should be calculated if it hasn't been already.public double errorValue(boolean calculate)
errorValue in class NeuralConnectioncalculate - True if the value should be calculated if it hasn't been already.public void reset()
reset in class NeuralConnectionpublic void saveWeights()
saveWeights in class NeuralConnectionpublic void restoreWeights()
restoreWeights in class NeuralConnectionpublic void setLink(boolean input,
int val)
throws java.lang.Exception
input - True if this unit is used for entering an attribute, False if it's used for determining
a class value.val - The attribute number or class type that this unit represents. (for nominal attributes).java.lang.Exceptionpublic int getLink()
public java.lang.String getRevision()