net.sourceforge.cilib.functions.activation
Class ActivationFunction

java.lang.Object
  extended by net.sourceforge.cilib.functions.Function
      extended by net.sourceforge.cilib.functions.activation.ActivationFunction
All Implemented Interfaces:
Serializable, Differentiable, Cloneable
Direct Known Subclasses:
Sigmoid

public abstract class ActivationFunction
extends Function
implements Differentiable

Activation functions are functions that are typically used within Neurons. This class provides an abstraction for all functions that can be used in this manner.

See Also:
Serialized Form

Constructor Summary
ActivationFunction()
           
 
Method Summary
abstract  Double evaluate(Number number)
          Determine the value of the ActivationFunction at the provided point.
abstract  Double evaluate(Type x)
          Each function must provide an implementation which returns the function value at the given position.
abstract  Double getGradient(Number number)
          Determine the gradient of the ActivationFunction at the given point.
 
Methods inherited from class net.sourceforge.cilib.functions.Function
getBehavioralDomainRegistry, getDimension, getDomain, getDomainRegistry, getMaximum, getMinimum, setBehavioralDomain, setBehaviouralDomainRegistry, setDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.cilib.functions.Differentiable
getGradient
 
Methods inherited from interface net.sourceforge.cilib.util.Cloneable
getClone
 

Constructor Detail

ActivationFunction

public ActivationFunction()
Method Detail

evaluate

public abstract Double evaluate(Type x)
Each function must provide an implementation which returns the function value at the given position. The length of the position array should be the same as the function dimension.

Specified by:
evaluate in class Function
Parameters:
x - the position
Returns:
The result of the evaluation.

evaluate

public abstract Double evaluate(Number number)
Determine the value of the ActivationFunction at the provided point. The provided point is simply a Number that is provided as input.

Parameters:
number - The input value.
Returns:
The evaluation of the ActivationFunction, given number as input.

getGradient

public abstract Double getGradient(Number number)
Determine the gradient of the ActivationFunction at the given point.

Parameters:
number - The point at which the gradient is to be determined.
Returns:
The value of the gradient and the provided input.


Copyright © 2009 CIRG. All Rights Reserved.