Skip to main content

sigmoid

pub fn sigmoid<T: IsAnalytic>(x: T) -> T
Expand description

The sigmoid function is a common non-linear activation function that maps input values to a range between 0 and 1. It is defined as sigmoid(x) = 1 / (1 + exp(-x)), where exp is the exponential function. The sigmoid function is often used in machine learning and neural networks to introduce non-linearity into the model, allowing it to learn complex patterns in the data. In the context of signal processing, applying a sigmoid non-linearity can create distortion effects or be used for dynamic range compression.