Class StepActivationFunction

  • All Implemented Interfaces:
    ActivationFunction

    public class StepActivationFunction
    extends AbstractActivationFunction
    Classic perceptron-like step function. If the given input is greater than the threshold it will emit 1, else 0.
    Author:
    thomas.jungblut
    • Constructor Detail

      • StepActivationFunction

        public StepActivationFunction​(double threshold)
    • Method Detail

      • apply

        public double apply​(double input)
        Description copied from interface: ActivationFunction
        Applies the activation function on the given element.
      • gradient

        public double gradient​(double input)
        Description copied from interface: ActivationFunction
        Applies the gradient of the activation function on the given element.