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
Modifier and Type | Method and Description |
---|---|
void |
drawHighlight(Graphics g,
int w,
int h)
Call this function to draw the node highlighted.
|
void |
drawNode(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() |
String |
getRevision()
Returns the revision string.
|
boolean |
onUnit(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, weightValue
public NeuralEnd(String id)
public boolean onUnit(Graphics g, int x, int y, int w, int h)
onUnit
in class NeuralConnection
g
- 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(Graphics g, int w, int h)
drawNode
in class NeuralConnection
g
- The graphics context.w
- The width of the drawing area.h
- The height of the drawing area.public void drawHighlight(Graphics g, int w, int h)
drawHighlight
in class NeuralConnection
g
- 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 NeuralConnection
calculate
- True if the value should be calculated if it hasn't
been already.public double errorValue(boolean calculate)
errorValue
in class NeuralConnection
calculate
- True if the value should be calculated if it hasn't
been already.public void reset()
reset
in class NeuralConnection
public void saveWeights()
saveWeights
in class NeuralConnection
public void restoreWeights()
restoreWeights
in class NeuralConnection
public void setLink(boolean input, int val) throws 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).Exception
public int getLink()
public String getRevision()
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.