Sigmoid
The logistic sigmoid is a smooth, S-shaped function that maps real-valued inputs to values between zero and one.
Grokking Machine Learning
A function that maps a real-valued input to a value between zero and one, commonly interpreted as a binary class probability.
- How it is used
- Maps classifier scores to continuous 0–1 predictions for sentiment classification.
- How deep it goes
- Explains the input-output pattern, midpoint, continuity, differentiability, and contrast with the step function.
- Examples
- Uses sentence-happiness predictions and sample sigmoid outputs for inputs from −5 to 5.
- What you can do after
- Understand how sigmoid scores become continuous class predictions, with 0.5 separating two classes.
Build AI Drug Discovery Pipelines
The logistic function, or sigmoid, is an S-shaped function that maps real-valued inputs to values between zero and one.
- How it is used
- Uses sigmoid outputs for compound inhibition probabilities, independent multilabel predictions, and recurrent-network gates.
- How deep it goes
- Defines the equation and explains training, differentiability, and the linear decision boundary of a single logistic unit.
- Examples
- Illustrates cytochrome P450 inhibition screening and PyTorch sigmoid evaluation with backpropagation.
- What you can do after
- Apply it via PyTorch to a weighted score and compute gradients for logistic regression.
Read how Build AI Drug Discovery Pipelines explains sigmoid →
Grokking Machine Learning, Second Edition
The sigmoid function maps a real-valued input smoothly to a value between zero and one, commonly interpreted as a binary-class probability.
- How it is used
- Turns classifier scores into soft binary predictions interpretable as probabilities.
- How deep it goes
- Defines the mapping, contrasts it with the step function, and implements it inside logistic regression without deriving calculus details.
- Examples
- Uses happy/sad alien-language sentences, numeric sigmoid values, a weighted perceptron, and plotted classifier boundaries.
- What you can do after
- Build it from scratch as a Python sigmoid, then apply it to weighted scores in logistic classification.
Read how Grokking Machine Learning, Second Edition explains sigmoid →
Inside Deep Learning: Math, Algorithms, Models
A nonlinear activation function that maps real-valued inputs to a bounded interval.
- How it is used
- Supplies nonlinearity between linear layers, controls LSTM information flow, and constrains GAN generator outputs when the data range calls for it.
- How deep it goes
- Defines the output range, plots a NumPy calculation, and explains gating by multiplication; notes vanishing gradients without deriving them.
- Examples
- Uses a comparison plot, an LSTM gate multiplying a value, and an optional `nn.Sigmoid` on a GAN generator.
- What you can do after
- Apply it via PyTorch `nn.Sigmoid` to constrain generator outputs, or understand why sigmoid suits an LSTM gate despite saturation.
Read how Inside Deep Learning: Math, Algorithms, Models explains sigmoid →
Statistics Every Programmer Needs
A sigmoid function is a function with an S-shaped curve that transitions smoothly between lower and upper limiting values.
- How it is used
- Transforms a linear combination of predictors into a probability for binary classification.
- How deep it goes
- Explains the S-shaped transformation, fitted-coefficient calculation, and classification threshold; does not develop the sigmoid independently of logistic regression.
- Examples
- Calculates raisin-class probabilities from minor-axis length and perimeter, then compares thresholded predictions with recorded classes.
- What you can do after
- Apply it via fitted logistic-regression coefficients to calculate binary-class probabilities and make threshold-based predictions.
Read how Statistics Every Programmer Needs explains sigmoid →
Timeless Algorithms, The Foundational Ideas
A sigmoid function is a smooth S-shaped function that maps real-valued inputs to values between zero and one.
- How it is used
- Transforms linear predictors into probabilities and neural-network pre-activations into internal signals or output probabilities.
- How deep it goes
- Defines the logistic formula and works through predictions and hidden activations, while deferring backpropagation calculations.
- Examples
- Calculates probabilities for three inputs to a logistic model and activations for two hidden nodes.
- What you can do after
- Evaluate and understand sigmoid outputs as probabilities or internal signals according to their role in a model.
Read how Timeless Algorithms, The Foundational Ideas explains sigmoid →
Grokking Statistics
An S-curve is a sigmoid-shaped relationship in which growth is initially rapid, then slows toward a plateau.
- How it is used
- Maps inputs to bounded probabilities for binary classification and frames capability gains against data-collection expense.
- How deep it goes
- Defines the curve, interprets its inflection point, gives its formula, and defers the mathematics of maximum-likelihood fitting.
- Examples
- Uses toddler meltdowns versus hours without a nap, Python plots, and capability coverage that plateaus with increasing expense.
- What you can do after
- Apply it via scikit-learn or the formula to predict a binary outcome’s probability from an input.
Grokking AI Algorithms, Second Edition
A sigmoid function is a bounded S-shaped mathematical function that maps real-valued inputs to values between two limits, commonly zero and one.
- How it is used
- Uses sigmoid as an activation function in perceptrons and neural networks, including probability-like outputs.
- How deep it goes
- Explains the curve, implementation, derivative, and vanishing-gradient limitation, with forward- and backpropagation applications.
- Examples
- Uses a car-collision prediction and a loan-decision network to illustrate sigmoid activations.
- What you can do after
- Builds sigmoid from scratch in Python and applies it in a neural-network prediction.
Read how Grokking AI Algorithms, Second Edition explains sigmoid →
Applied Reinforcement Learning
A differentiable function that maps real numbers to values between zero and one.
- How it is used
- Squashes unbounded Gaussian policy samples into the bounded range required for fan-speed actions.
- How deep it goes
- Defines the sigmoid and explains action squashing, boundary compression, and log-probability correction without deriving them.
- Examples
- Uses Gaussian samples transformed into fan-speed actions between zero and one.
- What you can do after
- Apply it in a squashed Gaussian policy to produce bounded actions and corrected log-probabilities.
Data Without Labels
A sigmoid function is a differentiable S-shaped function that maps real-valued inputs to bounded output values and is commonly used to produce binary-classification scores.
- How it is used
- Turns fitted classification scores into event probabilities and serves as a neural-network activation for binary outputs.
- How deep it goes
- Defines the logistic equation and logit relationship, then explains bounded outputs and activation roles without a training procedure.
- Examples
- Contrasts linear and sigmoid probability curves and uses customer classification to illustrate predicted event probabilities.
- What you can do after
- Evaluate/understand why binary classifiers use a sigmoid to produce bounded probability scores.
Natural Language Processing in Action, Second Edition
A logistic function is an S-shaped mathematical function that maps an input to a bounded continuous value and provides a soft threshold.
- How it is used
- Deploys sigmoid as a soft binary decision in logistic regression, perceptrons, neural networks, and independent multi-label outputs.
- How deep it goes
- Explains the S-shaped behavior, parameter effects, model equivalence, PyTorch implementation, training loss, and multi-label use.
- Examples
- Uses plotted logistic curves, PyTorch name classification, binary cross-entropy, training metrics, and predictions for sample names.
- What you can do after
- Build it from scratch with NumPy or PyTorch, and apply it to binary classification or independent multi-label prediction.
Read how Natural Language Processing in Action, Second Edition explains sigmoid →
Knowledge Graphs and LLMs in Action
A sigmoid activation maps a real-valued score to a value between zero and one, commonly interpreted as a probability for a binary outcome.
- How it is used
- Uses sigmoid to turn classifier or link-compatibility scores into interpretable probabilities for binary prediction.
- How deep it goes
- Explains score-to-probability conversion and loss integration, but does not derive the sigmoid mathematically.
- Examples
- Uses graph-node classification and user–movie recommendation link prediction as concrete applications.
- What you can do after
- Apply it via PyTorch’s F.binary_cross_entropy_with_logits to train probability-producing link-prediction models.
Read how Knowledge Graphs and LLMs in Action explains sigmoid →
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
A sigmoid is a smooth mathematical function that maps real-valued inputs to values between zero and one.
- How it is used
- Converts logits from classification and deployed model endpoints into probabilities suitable for interpretation.
- How deep it goes
- Explains the formula, smooth bounded behavior, logit relationship, and application to model outputs.
- Examples
- Demonstrates gradient boosting probability histograms and a property prediction yielding 17.9% probability above the median.
- What you can do after
- Apply it via TensorFlow to transform raw model predictions into interpretable probabilities.
Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains sigmoid →
How Large Language Models Work
An S-curve is a growth pattern in which progress accelerates, reaches a transition region, and then approaches a plateau.
- How it is used
- Frames claims about technological and LLM self-improvement against diminishing returns and practical constraints.
- How deep it goes
- Defines plateau behavior, explains constraints, and contrasts ordinary with iterative S-curves without mathematical derivation.
- Examples
- Uses transistor growth, system performance, GPUs, and successive technological techniques as examples.
- What you can do after
- Evaluate claims of boundless improvement by identifying plateaus, constraints, and possible new techniques.
Learn Generative AI with PyTorch
An activation function that maps outputs into the range 0 to 1, used here to interpret the discriminator output as a probability.
- How it is used
- Uses sigmoid to convert a single neural-network output into a probability for binary classification or discriminator decisions.
- How deep it goes
- Defines the output range and placement in PyTorch models, but does not derive the sigmoid formula or explain its gradients.
- Examples
- Uses ankle-boot classification, t-shirt classification, and real-versus-fake discriminator outputs as examples.
- What you can do after
- Apply it via PyTorch by placing nn.Sigmoid() after a one-unit final linear layer for binary model outputs.
Read how Learn Generative AI with PyTorch explains sigmoid →
Deep Learning with R, Third Edition
A sigmoid activation function maps arbitrary real-valued inputs to values in the interval from zero to one.
- How it is used
- Deploys sigmoid as the final activation for binary classification, producing a scalar interpreted as the positive-class probability.
- How deep it goes
- Defines sigmoid as a squashing function, explains its probability interpretation, and contrasts its bounded range with linear regression outputs.
- Examples
- Uses a sentiment-classification model whose final one-unit Dense layer applies sigmoid.
- What you can do after
- Apply it via Keras as a one-unit final-layer activation for binary classification and pair it with binary crossentropy.
Read how Deep Learning with R, Third Edition explains sigmoid →
Machine Learning Algorithms in Depth
A sigmoid function is a continuous S-shaped function that maps real-valued inputs to values between zero and one.
- How it is used
- Converts real-valued scores into probability-like values for binary variational inference and neural-network classification.
- How deep it goes
- Uses sigmoid outputs in update equations and implementations, but does not develop its mathematical derivation or numerical properties.
- Examples
- Uses binary image denoising and duplicate-question prediction as concrete applications.
- What you can do after
- Apply it via scipy.special.expit or a neural-network sigmoid activation in probabilistic and classification workflows.
Read how Machine Learning Algorithms in Depth explains sigmoid →
Deep Learning with Python, Third Edition
A statistical classification method that models class probabilities with a linear predictor passed through a logistic function.
- How it is used
- Maps a binary classifier’s final numeric output to a probability-like score between 0 and 1.
- How deep it goes
- Defines the output range and placement, but stops short of deriving the sigmoid formula or explaining its internals.
- Examples
- Uses sentiment classification and dogs-versus-cats image classification as concrete binary-output examples.
- What you can do after
- Apply it via Keras by configuring one sigmoid output unit and binary crossentropy for binary classification.
Read how Deep Learning with Python, Third Edition explains sigmoid →
Math and Architectures of Deep Learning
An S-shaped nonlinear activation function whose steepness and horizontal position can be adjusted with parameters.
- How it is used
- Uses a nonlinear activation to extend weighted-sum models toward more complex classification and function-approximation tasks.
- How deep it goes
- Defines the curve, parameter effects, differentiability, and derivative behavior, but does not provide implementation code.
- Examples
- Uses weighted-sum classification, parameterized curves, derivative-overlaid graphs, and transformed manifolds as examples.
- What you can do after
- Evaluate how sigmoid steepness, position, saturation, and differentiability affect neural-network classification and training.
Read how Math and Architectures of Deep Learning explains sigmoid →
Fight Fraud with Machine Learning
A sigmoid function is a smooth S-shaped function that maps real-valued inputs to a bounded interval, commonly zero to one.
- How it is used
- Converts neural-network scores into bounded outputs for binary classification and face-matching predictions.
- How deep it goes
- Explains bounded outputs, classification use, gradient limitations, and Siamese placement, but does not provide the sigmoid formula or implementation code.
- Examples
- Uses dog-versus-cat classification, logistic regression, and paired-face similarity as concrete sigmoid applications.
- What you can do after
- Evaluate sigmoid’s suitability for bounded classification outputs and recognize its gradient trade-off against ReLU.
Read how Fight Fraud with Machine Learning explains sigmoid →
GPU Programming with Triton
The sigmoid function commonly refers to the logistic function, which maps a real-valued input to 1 divided by 1 plus the exponential of its negation.
- How it is used
- Uses sigmoid as the nonlinear component of SiLU in an element-wise GPU computation.
- How deep it goes
- Defines sigmoid mathematically and applies it in SiLU, without deriving its properties or implementation internals.
- Examples
- Demonstrates sigmoid through SiLU outputs computed independently for elements of an input vector.
- What you can do after
- Apply it via Triton as part of an element-wise SiLU kernel.
Transfer Learning for Natural Language Processing
A sigmoid function maps real-valued inputs to values between zero and one, with an S-shaped curve.
- How it is used
- Uses sigmoid outputs to estimate class probabilities in logistic regression and to classify positive examples in a neural network.
- How deep it goes
- Defines the output range and curve, then explains threshold-based classification without deriving the function.
- Examples
- Uses logistic regression and an ELMo-based Keras classifier for email and movie-review classification.
- What you can do after
- Apply it via a Keras output layer and classify the positive class when its probability exceeds a chosen threshold.
Read how Transfer Learning for Natural Language Processing explains sigmoid →
Reinforcement Learning from Human Feedback
The sigmoid function maps a real-valued input to a number between zero and one using the function 1/(1+e^-x).
- How it is used
- Converts reward-score differences into probabilities for pairwise preference modeling.
- How deep it goes
- Defines the function and derives its use in equivalent likelihood and negative-log-likelihood objectives.
- Examples
- Uses chosen and rejected language-model completions scored under a prompt.
- What you can do after
- Apply sigmoid within a Bradley–Terry reward-model objective for pairwise preference training.
Read how Reinforcement Learning from Human Feedback explains sigmoid →
Also covered in
- AI-Powered Search
- Machines that ThinkIn early access (MEAP)
- Optimization Algorithms: AI techniques for design, planning, and control problems
- Vibe EngineeringIn early access (MEAP)
- Ensemble Methods for Machine Learning
- Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- linear regressionLinear regression is a statistical method that models a numeric response as a linear function of one or more predictor variables with fitted parameters.
- objective functionAn objective function is a mathematical function that assigns values to candidate solutions or parameter settings, which an optimization procedure seeks to minimize or maximize.
- classifierA classifier is a predictive model that assigns an input to one or more discrete classes or categories.
Related concepts
- activation functionkind of · An activation function transforms a neural-network unit’s input into its output, often introducing nonlinearity.
- probabilityproduces · Probability is a mathematical measure, from zero to one, of the likelihood that an event or outcome occurs or is true.
- logistic regressionused by · Logistic regression is a statistical classification model that estimates class probabilities by applying a logistic or softmax function to a linear combination of input features.
- language modelused by · A language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- cross entropy lossused by · Cross-entropy loss measures the expected negative log probability that a predicted distribution assigns to outcomes drawn from a target distribution.
- probability theoryproduces · Probability theory is the mathematical framework for quantifying and reasoning about uncertainty in events, variables, and outcomes.
Questions about sigmoid
What is sigmoid?
The logistic sigmoid is a smooth, S-shaped function that maps real-valued inputs to values between zero and one.
Which Manning books explain sigmoid?
Grokking Machine Learning, Build AI Drug Discovery Pipelines, Grokking Machine Learning, Second Edition, Inside Deep Learning: Math, Algorithms, Models, Statistics Every Programmer Needs, Timeless Algorithms, The Foundational Ideas, Grokking Statistics, Grokking AI Algorithms, Second Edition and 15 more.
What should I know before learning sigmoid?
Manning books that teach sigmoid usually introduce language model, linear regression, objective function and classifier first.
What is sigmoid a kind of?
Sigmoid is a kind of activation function. An activation function transforms a neural-network unit’s input into its output, often introducing nonlinearity.
What is sigmoid also called?
Sigmoid is also called logistic function.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.






















