com.anji.nn
Class SignedStepActivationFunction
java.lang.Object
com.anji.nn.SignedStepActivationFunction
- All Implemented Interfaces:
- ActivationFunction
public class SignedStepActivationFunction
- extends java.lang.Object
- implements ActivationFunction
Step activation function.
- Author:
- Philip Tucker
Field Summary |
static java.lang.String |
NAME
identifying string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NAME
public static final java.lang.String NAME
- identifying string
- See Also:
- Constant Field Values
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
apply
public double apply(double input)
- Description copied from interface:
ActivationFunction
- Apply activation function to input.
- Specified by:
apply
in interface ActivationFunction
- Returns:
- -1 if
input
< 0, 1 otherwise - See Also:
ActivationFunction.apply(double)
getMaxValue
public double getMaxValue()
- Specified by:
getMaxValue
in interface ActivationFunction
- Returns:
- ceiling value for this function
- See Also:
ActivationFunction.getMaxValue()
getMinValue
public double getMinValue()
- Specified by:
getMinValue
in interface ActivationFunction
- Returns:
- floor value for this function
- See Also:
ActivationFunction.getMinValue()
cost
public long cost()
- Specified by:
cost
in interface ActivationFunction
- Returns:
- number corresponding to cost of activation in resources
- See Also:
ActivationFunction.cost()