Skip to content

OutputNode Class

This class is responsible for managing output nodes. These nodes are effectively the same as hidden nodes expect that their output values are specifically saved as the network's output values. They are always on the last layer.

OutputNode .new(string activName, string name, number bias, number learningRate) Creates and returns the OutputNode with the given activation function, name, bias, and learning rate.
void :() Fires the OutputNode and saves it's output value to the network's output values.

This function is fired when the OutputNode object is called, such as:
outputNode:()
void :SetDirectOutput(bool bool) Sets whether or not the OutputNode should use it's activation function and bias or not. This is useful when you want to only use the hidden nodes and don't want the output nodes to interfere.

Inherited from Node:

Only unchanged and unmodified functions are listed below.

number :GetValue() Returns the node's output value if calculated. If not, calculates it and returns the new output value.
void :SetValue(number value) Sets the node's output value to !value!.
number :CalculateValue() Calculates and sets the node's new output value while also returning it.
void :ClearValue() Resets the node's output value.
void :AddInputSynapse(Synapse inputSynapse) Adds the synapse !inputSynapse! as an input synapse.
void :AddOutputSynapse(Synapse outputSynapse) Adds the synapse !outputSynapse! as an output synapse.
array :GetInputSynapses() Returns the input synapses.
array :GetOutputSynapses() Returns the output synapses.
void :RemoveInputSynapse(Synapse inputSynapse) Removes the input synapse !inputSynapse!.
void :RemoveOutputSynapse(Synapse outputSynapse) Removes the output synapse !inputSynapse!.
void :ClearInputSynapses() Removes all input synapses.
void :ClearOutputSynapses() Removes all output synapses.
void :SetBias(number bias) Sets the node's bias to !bias!.
number :GetBias() Returns the node's bias.
void :AddBias(number biasDelta) Adds !biasDelta! to the noder's bias.
void :SetLearningRate(number learningRate) Sets the node's learning rate to !learningRate!.
number :GetLearningRate() Returns the node's learning rate.
ActivationFunction :GetActivationFunction() Returns the node's ActivationFunction object.
void :AddRandomNoise(number min, number max) Adds random noise to the node's bias and input weights with the given minimum !min! and maximum !max!.