|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActivationFunction
This interface allows various activation functions to be used with the neural network. Activation functions are applied to the output from each layer of a neural network. Activation functions scale the output into the desired range. Methods are provided both to process the activation function, as well as the derivative of the function. Some training algorithms, particularly back propagation, require that it be possible to take the derivative of the activation function. Not all activation functions support derivatives. If you implement an activation function that is not derivable then an exception should be thrown inside of the derivativeFunction method implementation. Non-derivable activation functions are perfectly valid, they simply cannot be used with every training algorithm.
Method Summary | |
---|---|
void |
activationFunction(double[] d,
int start,
int size)
Implements the activation function. |
ActivationFunction |
clone()
|
double |
derivativeFunction(double b,
double a)
Calculate the derivative. |
String |
getFactoryCode()
|
String[] |
getParamNames()
|
double[] |
getParams()
|
boolean |
hasDerivative()
|
void |
setParam(int index,
double value)
Set one of the params for this activation function. |
Method Detail |
---|
void activationFunction(double[] d, int start, int size)
d
- The input array to the activation function.start
- The starting index.size
- The number of values to calculate.double derivativeFunction(double b, double a)
b
- The number to calculate the derivative of, the number "before" the
activation function was applied.a
- The number "after" an activation function has been applied.
boolean hasDerivative()
double[] getParams()
void setParam(int index, double value)
index
- The index of the param to set.value
- The value to set.String[] getParamNames()
ActivationFunction clone()
String getFactoryCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |