Binary Step Activation Function

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
Published Jul 16, 2023
Contribute to Docs

Binary Step is the simplest threshold-based activation function which works by either activating the node, i.e. passing on its output to the next layer in case the threshold value is surpassed, or doing nothing at all.

Binary Step Activation Plot

Mathematically, it can be defined as:

Binary Step Activation Function

If the node input value is less than 0, it returns 0 as output. Else, it returns 1.

Usage and Limitations

As the name suggests, binary step can be used as an activation function in the output layer of a neural network for binary classification problems.

It is generally not suggested to use binary step in the hidden layer as it is a linear piecewise function unable to handle complex representations.

Codebyte Example

The following is an example of the activation function in Python:

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

All contributors

Looking to contribute?

Learn AI on Codecademy