activationFunction
Class LinearActivationFunction

java.lang.Object
  extended by activationFunction.LinearActivationFunction
All Implemented Interfaces:
ActivationFunctionModel

public class LinearActivationFunction
extends java.lang.Object
implements ActivationFunctionModel

Linear Activation Function return value calculated by function describe as y = a * x + b. where:
a, b - parameters of linear function x - input value


Constructor Summary
LinearActivationFunction()
          Creates a new instance of LinearActivationFunction with default parameters set a=1, b=0
 
Method Summary
 double[] getParamateres()
          Return parameters of the Linear Activation function.
 double getValue(double inputValue)
          Return value y of Linear Activation function for specified input value x.
 void setParameteres(double[] paramateresList)
          Set the parameters of function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearActivationFunction

public LinearActivationFunction()
Creates a new instance of LinearActivationFunction with default parameters set a=1, b=0

Method Detail

setParameteres

public void setParameteres(double[] paramateresList)
Set the parameters of function. First parameter is a, second is b.

Specified by:
setParameteres in interface ActivationFunctionModel
Parameters:
paramateresList - array of parameters

getParamateres

public double[] getParamateres()
Return parameters of the Linear Activation function. First value is a, second is b.

Specified by:
getParamateres in interface ActivationFunctionModel
Returns:
double array of the parameters

getValue

public double getValue(double inputValue)
Return value y of Linear Activation function for specified input value x. y = a * x + b

Specified by:
getValue in interface ActivationFunctionModel
Parameters:
inputValue - input value
Returns:
value of linear function