jhpro.nnet.jknnl
Class LinearActivationFunction
- java.lang.Object
-
- jhpro.nnet.jknnl.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
Constructors Constructor and Description LinearActivationFunction()Creates a new instance of LinearActivationFunction with default parameters set a=1, b=0
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getParamateres()Return parameters of the Linear Activation function.doublegetValue(double inputValue)Return value y of Linear Activation function for specified input value x.voidsetParameteres(double[] paramateresList)Set the parameters of function.
-
-
-
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:
setParameteresin interfaceActivationFunctionModel- 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:
getParamateresin interfaceActivationFunctionModel- 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:
getValuein interfaceActivationFunctionModel- Parameters:
inputValue- input value- Returns:
- value of linear function
-
-
DMelt 3.0 © DataMelt by jWork.ORG