The Encog Project

org.encog.neural.activation
Class ActivationLinear

java.lang.Object
  extended by org.encog.neural.activation.BasicActivationFunction
      extended by org.encog.neural.activation.ActivationLinear
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ActivationFunction, EncogPersistedObject

public class ActivationLinear
extends BasicActivationFunction

The Linear layer is really not an activation function at all. The input is simply passed on, unmodified, to the output. This activation function is primarily theoretical and of little actual use. Usually an activation function that scales between 0 and 1 or -1 and 1 should be used.

See Also:
Serialized Form

Constructor Summary
ActivationLinear()
           
 
Method Summary
 void activationFunction(double[] d)
          Implements the activation function.
 java.lang.Object clone()
           
 Persistor createPersistor()
          Create a Persistor for this activation function.
 void derivativeFunction(double[] d)
          Implements the activation function derivative.
 boolean hasDerivative()
           
 
Methods inherited from class org.encog.neural.activation.BasicActivationFunction
getDescription, getName, setDescription, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivationLinear

public ActivationLinear()
Method Detail

activationFunction

public void activationFunction(double[] d)
Implements the activation function. The array is modified according to the activation function being used. See the class description for more specific information on this type of activation function.

Parameters:
d - The input array to the activation function.

clone

public java.lang.Object clone()
Specified by:
clone in interface EncogPersistedObject
Overrides:
clone in class BasicActivationFunction
Returns:
The object cloned.

createPersistor

public Persistor createPersistor()
Create a Persistor for this activation function.

Specified by:
createPersistor in interface EncogPersistedObject
Overrides:
createPersistor in class BasicActivationFunction
Returns:
The persistor.

derivativeFunction

public void derivativeFunction(double[] d)
Implements the activation function derivative. The array is modified according derivative of the activation function being used. See the class description for more specific information on this type of activation function. Propagation training requires the derivative. Some activation functions do not support a derivative and will throw an error.

Parameters:
d - The input array to the activation function.

hasDerivative

public boolean hasDerivative()
Returns:
Return false, linear has no derivative.

The Encog Project