Logistic regression
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.
Grokking Machine Learning
A perceptron-like model that outputs a continuous value between 0 and 1 rather than a discrete class label.
- How it is used
- Uses continuous scores to classify labeled data while conveying more than a 0-or-1 prediction.
- How deep it goes
- Develops the sigmoid prediction, log loss, iterative weight updates, a Python implementation, and a library application.
- Examples
- Works through word-count sentiment data and IMDB reviews, then compares a Titanic survival model with other classifiers.
- What you can do after
- Build it from scratch with Python updates or apply it via Turi Create and Scikit-Learn, then check predictions and validation metrics.
Read how Grokking Machine Learning explains logistic regression →
Statistics Slam Dunk
Logistic regression is a statistical model that predicts the probability of a categorical outcome, typically by applying a logistic function to a linear predictor.
- How it is used
- Predicts binary outcomes such as postseason qualification while comparing offensive and defensive predictors.
- How deep it goes
- Explains binary targets, probabilities, maximum likelihood, log odds, fitting, classification, and evaluation metrics without deriving estimation procedures.
- Examples
- Uses NBA teams’ points allowed and points scored to predict postseason qualification and compare two simple models.
- What you can do after
- Apply it via base R glm() to fit binary classifiers, threshold probabilities, and evaluate predictions with confusion-matrix and ROC metrics.
Read how Statistics Slam Dunk explains logistic regression →
Grokking Machine Learning, Second Edition
A perceptron-like classifier that applies a logistic function to a linear combination of features to produce a continuous class probability or score.
- How it is used
- Produces continuous class scores for binary classification, including sentiment analysis.
- How deep it goes
- Works through sigmoid predictions, log loss, iterative updates, and hand-coded training; defers a thorough gradient-descent derivation.
- Examples
- Uses happy-versus-sad word-count sentences, a small two-feature dataset, and IMDB movie reviews.
- What you can do after
- Build it from scratch with sigmoid, log loss, and weight updates, or apply it through scikit-learn to review sentiment.
Read how Grokking Machine Learning, Second Edition explains logistic regression →
Grokking Statistics
A regression method that models the probability of a categorical outcome using a logistic link function.
- How it is used
- Classifies binary outcomes by estimating a label probability and applying a decision threshold.
- How deep it goes
- Explains binary data, sigmoid curves, thresholds, coefficients, plotting, and Python fitting; defers regularization details and multiclass classification.
- Examples
- Uses spam labels and a toddler-meltdown dataset relating hours without a nap to binary outcomes.
- What you can do after
- Apply it via scikit-learn to fit a binary classifier, inspect coefficients, plot its curve, and predict probabilities.
Timeless Algorithms, The Foundational Ideas
Logistic regression is a statistical model that estimates the probability of an outcome from a weighted combination of input variables.
- How it is used
- Uses logistic regression to connect binary prediction with maximum likelihood estimation.
- How deep it goes
- Develops the linear predictor, sigmoid and likelihood, then uses numerical predictions; leaves optimization techniques unspecified.
- Examples
- Illustrates binary outcomes with click prediction and calculates probabilities for predictor values of 2, 5 and 8.
- What you can do after
- Enables readers to evaluate predicted probabilities and understand how a decision threshold produces a binary prediction.
Read how Timeless Algorithms, The Foundational Ideas explains logistic regression →
Natural Language Processing in Action, Second Edition
Logistic regression is a statistical classification model that estimates the probability of a class from a weighted combination of input features.
- How it is used
- Connects weighted features to probability-based classification, neural neurons, NLP pipelines, and simple decision gates.
- How deep it goes
- Explains sigmoid behavior, parameter effects, feature preparation, and model equivalence while deferring detailed training mechanics.
- Examples
- Uses clickbait headlines, fake-news classification, recorded name counts, character n-grams, and plotted logistic curves.
- What you can do after
- Apply it with Python feature vectors and scikit-learn, or build its sigmoid component from scratch and inspect parameter effects.
Read how Natural Language Processing in Action, Second Edition explains logistic regression →
Build AI Drug Discovery Pipelines
Logistic regression is a statistical classification method that models class probabilities using a logistic function of input features.
- How it is used
- Applies binary classification to prioritize compounds and identify potential CYP enzyme inhibitors in drug-discovery workflows.
- How deep it goes
- Explains sigmoid probabilities, thresholds, BCE, gradient descent, metrics, and calibration, while deferring extensive feature engineering and tuning.
- Examples
- Demonstrates USAN-stem classification and CYP3A4 inhibition using RDKit fingerprints, validation metrics, and a dummy baseline.
- What you can do after
- Apply it via Scikit-Learn to train, threshold, evaluate, and calibrate molecular binary classifiers.
Read how Build AI Drug Discovery Pipelines explains logistic regression →
Causal Inference for Data Science
Logistic regression is a statistical model that estimates the probability of a categorical, often binary, outcome using a logistic function of input variables.
- How it is used
- Estimates treatment probabilities from confounders to support propensity-score construction in healthcare and causal analysis.
- How deep it goes
- Explains binary probability prediction, model comparison, cross-validation, and AUC, while stopping short of detailed coefficient interpretation.
- Examples
- Uses a patient treatment table and synthetic variables where confounder Z influences binary treatment X and outcome Y.
- What you can do after
- Apply it to estimate each patient’s probability of receiving treatment and compare the resulting classifier with alternatives.
Read how Causal Inference for Data Science explains logistic regression →
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
Logistic regression is a regression model that estimates class probabilities using a logistic link function.
- How it is used
- Deploys logistic regression as a simple, effective baseline for tabular classification and a template for the standard modeling workflow.
- How deep it goes
- Explains probability output, link-function framing, preprocessing, evaluation, penalties, and solvers, but defers detailed optimization mechanics.
- Examples
- Demonstrates synthetic binary data, standardized features, encoded tabular columns, cross-validation scores, and alternative solver configurations.
- What you can do after
- Apply it via Scikit-learn to build, evaluate, and refit a processed tabular classification pipeline.
Effective Data Analysis
Logistic regression is a statistical model for estimating the relationship between a categorical outcome and one or more predictors.
- How it is used
- Uses predictors to estimate or predict a categorical outcome in an analytics or statistical modeling problem.
- How deep it goes
- Defines the model and its role, relates it to linear regression, and defers detailed regression methods.
- Examples
- Uses advertisement-click prediction from user age and viewing frequency as a categorical-outcome example.
- What you can do after
- Evaluate whether a categorical-outcome prediction problem calls for logistic regression rather than linear regression.
Read how Effective Data Analysis explains logistic regression →
Data Without Labels
A classification method that models class-event probabilities using a logistic or sigmoid transformation of input variables.
- How it is used
- Frames customer-churn prediction as binary supervised classification using historical customer attributes.
- How deep it goes
- Defines the sigmoid, logit, odds, intercept, and coefficient equations, but does not detail model fitting or evaluation procedures.
- Examples
- Uses a structured telecom dataset containing revenue, service duration, average cost, usage, and churn labels.
- What you can do after
- Evaluate customer churn probabilities from historical labeled attributes and distinguish bounded logistic outputs from linear predictions.
Ensemble Methods for Machine Learning
Logistic regression is a statistical classification model that estimates class probabilities by applying a logistic function to a linear combination of input features.
- How it is used
- Classifies binary outcomes by estimating class probabilities from feature values.
- How deep it goes
- Explains the logit, sigmoid, Bernoulli assumption, additive weights, and odds interpretation, then demonstrates library training.
- Examples
- Uses diabetes diagnosis, breast-cancer diagnosis, a one-feature probability figure, and a scikit-learn training listing.
- What you can do after
- Apply it via scikit-learn, estimate binary-class probabilities, and interpret feature effects through changes in odds.
Read how Ensemble Methods for Machine Learning explains logistic regression →
Starting Data Analytics with Generative AI and Python
Logistic regression is a regression method that models the probability of a categorical outcome, commonly a binary outcome.
- How it is used
- Uses categorical-outcome modeling to investigate e-commerce efficiency, completion rates, and customer satisfaction.
- How deep it goes
- Positions logistic regression as an inferential technique for identifying predictors, without explaining estimation, assumptions, or implementation.
- Examples
- Examines order completion, payment methods, delivery time, product price, and customer satisfaction in Brazilian e-commerce data.
- What you can do after
- Evaluate potential predictors of categorical business outcomes and connect findings to cautious recommendations.
Read how Starting Data Analytics with Generative AI and Python explains logistic regression →
Transfer Learning for Natural Language Processing
A statistical classification method that models class probabilities using a logistic function of input features.
- How it is used
- Uses logistic regression as a baseline classifier for email spam and movie-review sentiment tasks.
- How deep it goes
- Defines probability estimation and demonstrates fitting and holdout evaluation, without detailing model internals.
- Examples
- Compares email spam and IMDB review classification using reported accuracy scores.
- What you can do after
- Apply logistic regression via scikit-learn to fit a classifier and evaluate predictions on held-out data.
Read how Transfer Learning for Natural Language Processing explains logistic regression →
Machine Learning Algorithms in Depth
A probabilistic classification model that maps inputs to class probabilities using a logistic or softmax transformation of a linear score.
- How it is used
- Uses probabilistic modeling to classify inputs into discrete class labels.
- How deep it goes
- Derives posterior probabilities, likelihood, gradients, and SGD updates before showing an implementation and visual results.
- Examples
- Demonstrates two Gaussian feature clusters, SGD training, cost reduction, and a learned decision boundary.
- What you can do after
- Build it from scratch with stochastic gradient descent and visualize its cost and decision boundary.
Read how Machine Learning Algorithms in Depth explains logistic regression →
The Art of AI Product Development
Logistic regression is a statistical classification model that estimates class probabilities using a logistic function of input features.
- How it is used
- Supports simple classification tasks where cost, privacy, speed, and interpretability influence model selection.
- How deep it goes
- Explains probability outputs, feature contributions, and trade-offs with neural networks, but stops short of mathematical or implementation detail.
- Examples
- Uses sentiment analysis, user segmentation, probability estimates, and feature-contribution examples.
- What you can do after
- Evaluate classification-model trade-offs and select an interpretable baseline when slightly lower accuracy is acceptable.
Read how The Art of AI Product Development explains logistic regression →
Also covered in
- Privacy-Preserving Machine Learning
- Graph Neural Networks in Action
- Fight Fraud with Machine LearningIn early access (MEAP)
- Causal AI
- Software Engineering for Data ScientistsIn early access (MEAP)
What to know first
- 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.
- classifierA classifier is a predictive model that assigns an input to one or more discrete classes or categories.
- independent variableAn independent variable is an input or explanatory variable used to model, explain, or predict variation in an outcome, without necessarily causing it.
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
Related concepts
- maximum likelihood estimationuses · Maximum likelihood estimation is a statistical method that selects parameter values maximizing the likelihood of observed data under a specified probabilistic model.
- support vector machinecontrasts with · A support vector machine is a supervised-learning model that uses support vectors to define a maximum-margin decision boundary or regression function, with kernels enabling nonlinear relationships.
- classifierkind of · A classifier is a predictive model that assigns an input to one or more discrete classes or categories.
- sigmoiduses · The logistic sigmoid is a smooth, S-shaped function that maps real-valued inputs to values between zero and one.
Questions about logistic regression
What is logistic regression?
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.
Which Manning books explain logistic regression?
Grokking Machine Learning, Statistics Slam Dunk, Grokking Machine Learning, Second Edition, Grokking Statistics, Timeless Algorithms, The Foundational Ideas, Natural Language Processing in Action, Second Edition, Build AI Drug Discovery Pipelines, Causal Inference for Data Science and 8 more.
What should I know before learning logistic regression?
Manning books that teach logistic regression usually introduce linear regression, classifier, independent variable and language model first.
What is the difference between logistic regression and support vector machine?
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. A support vector machine is a supervised-learning model that uses support vectors to define a maximum-margin decision boundary or regression function, with kernels enabling nonlinear relationships.
What kinds of logistic regression are there?
Kinds of logistic regression include regularized logistic regression.
What is logistic regression a kind of?
Logistic regression is a kind of classifier. A classifier is a predictive model that assigns an input to one or more discrete classes or categories.
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.















