Package de.jungblut.math.activation
Interface ActivationFunction
-
- All Known Implementing Classes:
AbstractActivationFunction,ElliotActivationFunction,LinearActivationFunction,LogActivationFunction,ReluActivationFunction,SigmoidActivationFunction,SoftMaxActivationFunction,SoftplusReluActivationFunction,StepActivationFunction,TanhActivationFunction
public interface ActivationFunctionSquashing function interface to provide multiple activation functions, e.G. in theMultilayerPerceptron.- Author:
- thomas.jungblut
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doubleapply(double input)Applies the activation function on the given element.de.jungblut.math.DoubleMatrixapply(de.jungblut.math.DoubleMatrix matrix)Applies the gradient of the activation function on each element in the given matrix.de.jungblut.math.DoubleVectorapply(de.jungblut.math.DoubleVector vector)Applies the activation function on each element in the given vector.doublegradient(double input)Applies the gradient of the activation function on the given element.de.jungblut.math.DoubleMatrixgradient(de.jungblut.math.DoubleMatrix matrix)Applies the gradient of the activation function on each element in the given matrix.de.jungblut.math.DoubleVectorgradient(de.jungblut.math.DoubleVector vector)Applies the gradient of the activation function on each element in the given vector.
-
-
-
Method Detail
-
apply
double apply(double input)
Applies the activation function on the given element.
-
apply
de.jungblut.math.DoubleVector apply(de.jungblut.math.DoubleVector vector)
Applies the activation function on each element in the given vector.- Parameters:
vector- the vector to apply this function on.- Returns:
- a new vector that contains the activated elements.
-
apply
de.jungblut.math.DoubleMatrix apply(de.jungblut.math.DoubleMatrix matrix)
Applies the gradient of the activation function on each element in the given matrix.- Parameters:
matrix- the matrix to apply this function on.- Returns:
- a new matrix that contains the gradient of the elements.
-
gradient
double gradient(double input)
Applies the gradient of the activation function on the given element.
-
gradient
de.jungblut.math.DoubleVector gradient(de.jungblut.math.DoubleVector vector)
Applies the gradient of the activation function on each element in the given vector.- Parameters:
vector- the vector to apply this function on.- Returns:
- a new vector that contains the gradient of the elements.
-
gradient
de.jungblut.math.DoubleMatrix gradient(de.jungblut.math.DoubleMatrix matrix)
Applies the gradient of the activation function on each element in the given matrix.- Parameters:
matrix- the matrix to apply this function on.- Returns:
- a new matrix that contains the gradient of the elements.
-
-