|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.functions.neural.NeuralConnection
weka.classifiers.functions.MultilayerPerceptron.NeuralEnd
This inner class is used to connect the nodes in the network up to the data that they are classifying, Note that objects of this class are only suitable to go on the attribute side or class side of the network and not both.
Field Summary | |
private boolean |
m_input
True if node is an input, False if it's an output. |
private int |
m_link
the value that represents the instance value this node represents. |
Fields inherited from class weka.classifiers.functions.neural.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 Summary | |
MultilayerPerceptron.NeuralEnd(java.lang.String id)
|
Method Summary | |
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()
|
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 |
setLink(boolean input,
int val)
Call this function to set What this end unit represents. |
Methods inherited from class weka.classifiers.functions.neural.NeuralConnection |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int m_link
private boolean m_input
Constructor Detail |
public MultilayerPerceptron.NeuralEnd(java.lang.String id)
Method Detail |
public boolean onUnit(java.awt.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(java.awt.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(java.awt.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 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.Exception
public int getLink()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |