com.weighscore.neuro
Class Activation

public abstract class Activation
extends com.weighscore.neuro.ParameterHolder
This is an abstract class that defines the behavior of activation functions of neurons.
Version:
1.0
Author:
Fyodor Kravchenko
Method Detail

execute

public abstract double execute(double x)
Method of function execution. Should be implemented by subclass, defining the particular function
Parameters:
x - function's input value
Returns:
function's output value

inverseExecute

public abstract double inverseExecute(double fx)
Method for inverse function execution. Should be implemented by subclass, defining the particular inverse function
Parameters:
fx - inverse function input value
Returns:
inverse function output value

differentialExecute

public abstract double differentialExecute(double fx)
The differential function of this actiavation function. Takes the result of this activation function as a parameter
Parameters:
fx - the function output value
Returns:
differential

execute

public double execute(double x,
                      com.weighscore.neuro.Signal signal)
This method is called from the network processing routines. By default, it calls execute method. This method can be overriden if the activation function needs to be aware of the current status of activation of other network's neurons. This can be used to implement winner-takes-all neurons
Parameters:
x - function's input value
signal - the status of activation of other neurons
Returns:
function's output value
Throws:
NoResultYetException - if the neuron should not be acivated at this iteration because of the status of activation of other neurons

differentialExecute

public double differentialExecute(double fx,
                                  com.weighscore.neuro.Signal signal)
This method is called from the network processing routines. By default, it calls differentialExecute method. This method can be overriden if the activation function needs to be aware of the current status of activation of other network's neurons.
Parameters:
fx - the function output value
signal - the signal object to get the status of activation of other neurons
Returns:
differential
Throws:
NoResultYetException - if the neuron should wait at this iteration because of the status of computing differentials of other neurons

getNeuron

public com.weighscore.neuro.Neuron getNeuron()
The method returns the neuron which this activation belongs to
Returns:
this activation's neuron