Classifier
A classifier is a predictive computational model that assigns inputs to one or more discrete classes or categories.
Grokking Machine Learning
A supervised-learning technique that assigns an example to one or more discrete categories.
- How it is used
- Predicts categorical labels from features of labeled examples, including spam detection and app recommendations.
- How deep it goes
- Develops weighted-score, probability-based, and question-splitting classifiers, then compares decision-tree splits using accuracy, Gini impurity, and entropy.
- Examples
- Uses spam emails, sentence sentiment, animal labels, and app-download records to illustrate category predictions.
- What you can do after
- Build it from scratch by scoring features with a perceptron or splitting labeled examples with a decision tree, then compare predictions.
Outlier Detection in Python
The assignment of an input observation to one of a set of predefined categories.
- How it is used
- Distinguishes known outlier types, sorts flagged records, or supports detection through synthetic-data comparisons and detector-score ensembles.
- How deep it goes
- Defines categorical prediction and works through practical classifier uses, labeling constraints, and failure modes without deriving classification algorithms.
- Examples
- Uses labeled animal images, machinery-failure logs, real-versus-synthetic records, and decision-tree proxies for detector scores.
- What you can do after
- Evaluate/understand when a classifier can recognize or sort known outliers and when an outlier detector is needed for unknown ones.
Math and Architectures of Deep Learning
A supervised learning task that assigns inputs to discrete classes.
- How it is used
- Frames supervised prediction as assigning inputs to predetermined categories, from everyday decisions to image recognition.
- How deep it goes
- Develops categorical functions through feature-space geometry, boundaries, loss-driven training, MLP construction, and PyTorch implementations.
- Examples
- Uses cat threat decisions, face detection, object labels, height-weight classes, MNIST digits, and region-based object detection.
- What you can do after
- Build it from scratch as a decision boundary and apply it via PyTorch with cross-entropy, SGD, softmax, and argmax.
Read how Math and Architectures of Deep Learning explains classifier →
Deep Learning with Python, Third Edition
A supervised learning task that assigns text inputs to one of several classes.
- How it is used
- Assigns labels to text, from review sentiment to newswire topics.
- How deep it goes
- Works through labeled datasets, numeric inputs, output layers, losses, and evaluation; defers more complicated models such as Transformers.
- Examples
- Uses IMDb movie-review sentiment and Reuters newswire topic prediction as concrete text-labeling tasks.
- What you can do after
- Build it from scratch in Keras for binary or single-label multiclass text prediction, choosing an appropriate output and loss.
Read how Deep Learning with Python, Third Edition explains classifier →
Data Analysis with LLMs
Classification is the assignment of one or more predefined categories to an input item.
- How it is used
- Assigns reviews, emails, or comments to specified categories as a practical text-analysis task.
- How deep it goes
- Works through prompt contents and a CSV-to-label workflow, then checks results against known labels; does not explain model internals.
- Examples
- Uses laptop and movie reviews, email categories, offensive-comment filtering, and yes-or-no fruit-image questions.
- What you can do after
- Build it from scratch with Python and OpenAI’s library to label reviews in a CSV, then compare results with known sentiments.
Natural Language Processing in Action, Second Edition
Classification is the assignment of an input to one or more predefined categories based on its properties.
- How it is used
- Uses classification to label comments and sentiment, route queries, and filter chatbot interactions.
- How deep it goes
- Works through vector features, a centroid-based LDA approximation, cutoffs, and held-out evaluation; defers LDA’s underlying mathematics.
- Examples
- Uses labeled Wikipedia comments, ambiguous surname labels, and movie-to-product-review sentiment transfer.
- What you can do after
- Build it from scratch with centroid projections, then apply scikit-learn LDA and diagnose errors on held-out comments.
Read how Natural Language Processing in Action, Second Edition explains classifier →
Effective Conversational AI
Classification is the process of assigning an input to one or more predefined categories based on its features or content.
- How it is used
- Routes natural-language requests to intents that determine an assistant’s answer, dialogue, or next action.
- How deep it goes
- Defines utterances and intents, then works through training, blind testing, performance metrics, and iterative improvement without detailing model internals.
- Examples
- Uses flight-booking utterances, login-help test results, and comparisons of varied versus near-duplicate password requests.
- What you can do after
- Operate/configure it by selecting intents, improving examples from logs, testing predictions, and planning fallbacks for unsupported requests.
Effective Data Analysis
A classification problem is a prediction task whose outcome is one of a set of discrete classes or categories.
- How it is used
- Predicts categorical outcomes to support decisions such as ticket routing and targeted customer engagement.
- How deep it goes
- Defines classification against regression and illustrates model selection, testing, metrics, and deployment without deriving classifier internals.
- Examples
- Uses support-ticket priority and type, student graduation, and free-trial conversion as categorical prediction examples.
- What you can do after
- Evaluate/understand it by comparing classification with rules and testing out-of-sample predictions before operational use.
Learn Generative AI with PyTorch
A task of assigning one of several discrete categories to text sequences.
- How it is used
- Uses classification to label clothing images and to explain next-token prediction in generative text models.
- How deep it goes
- Works through a binary PyTorch model and testing; explains multicategory and next-token training without working through whole-text categorization.
- Examples
- Uses t-shirt-versus-ankle-boot and ten-category Fashion MNIST tasks, then next-token prediction for text and music.
- What you can do after
- Build it from scratch in PyTorch for clothing classification, then evaluate/understand next-token prediction as multicategory classification.
Read how Learn Generative AI with PyTorch explains classifier →
Deep Learning with R, Third Edition
A classification problem requires assigning inputs to discrete categories based on their characteristics.
- How it is used
- Assigns discrete labels to inputs such as movie reviews, newswires, and images.
- How deep it goes
- Details binary preprocessing and output choices, then gives configuration rules for multiclass and multilabel classifiers without mathematical derivations.
- Examples
- Uses movie-review sentiment, newswire topics, spam detection, image labels, and averaged classifier predictions.
- What you can do after
- Build it from scratch as a simple neural-network classifier, matching its output and loss to the label structure.
Read how Deep Learning with R, Third Edition explains classifier →
Machine Learning Algorithms in Depth
A classification algorithm learns a mapping from inputs to discrete class outputs.
- How it is used
- Maps labeled inputs to discrete classes for tasks including spam detection, document classification, and customer segmentation.
- How deep it goes
- Develops supervised notation, loss, evaluation, model selection, and selected classifiers through derivations and from-scratch implementations.
- Examples
- Uses an iris perceptron and decision tree, plus Bernoulli naive Bayes on 20 Newsgroups documents.
- What you can do after
- Build it from scratch using perceptron, Bernoulli naive Bayes, or CART, then assess predictions and generalization.
Read how Machine Learning Algorithms in Depth explains classifier →
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
A classification problem is a prediction task in which the target is a class or label.
- How it is used
- Frames tabular prediction when the desired output is a discrete class or label rather than a continuous value.
- How deep it goes
- Explains binary, multiclass, and multilabel use through logistic regression and target typing, without deriving its statistical functions.
- Examples
- Uses Airbnb prices split at the median, sklearn logistic-regression pipelines, and a fastai 0/1 target converted to strings.
- What you can do after
- Apply it via scikit-learn or fastai by defining a categorical target, preparing features, fitting a model, and checking accuracy or loss.
Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains classifier →
Machine Learning System Design
A machine-learning task that assigns an input to one or more discrete categories.
- How it is used
- Frames fraud screening and medical-image decisions as classification tasks whose labels and evaluation metrics must fit product goals.
- How deep it goes
- Works through class imbalance and classification metrics with examples, but does not explain classifier architectures or training procedures.
- Examples
- Compares fraud classifiers with equal recall and different false-positive counts, and contrasts binary with multiclass medical-image labels.
- What you can do after
- Evaluate/understand it by checking whether label detail and error metrics serve the product goal under changing class balance.
Read how Machine Learning System Design explains classifier →
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
A classification problem is a machine-learning problem in which data items are assigned to one of a predefined set of categories.
- How it is used
- Uses predefined categories to turn neural-network outputs into labels for iris and wine samples.
- How deep it goes
- Works through feature scaling, category encoding, training, output interpretation, and accuracy checks; only names alternative classifier techniques.
- Examples
- Tests three-species iris classification with four measurements and three-category wine classification with 13 measurements.
- What you can do after
- Build it from scratch with a Swift Network, encoded labels, an output interpreter, and a held-out accuracy check.
Starting Data Analytics with Generative AI and Python
A task that assigns observations or records to predefined categories.
- How it is used
- Sorts customer feedback into sentiment labels and frames keyword-based positive-review extraction as a classification task.
- How deep it goes
- Defines text classification and binary sensitivity and specificity, then demonstrates review-label comparison; does not develop classifier-training internals.
- Examples
- Illustrates customer-service email sorting, fraud detection, content moderation, review-score checks, and negative customer feedback.
- What you can do after
- Evaluate/understand it by comparing keyword-based review labels with review scores and checking sensitivity and specificity.
Read how Starting Data Analytics with Generative AI and Python explains classifier →
Causal Inference for Data Science
Classification is a predictive modeling task for assigning an instance to one of a set of discrete classes.
- How it is used
- Predicts discrete outcomes from historical feature–label pairs in supervised learning.
- How deep it goes
- Defines classification, formalizes its learned function, and relates binary accuracy to conditional probability.
- Examples
- Uses animal-image categories and contrasts them with continuous sales prediction.
- What you can do after
- Evaluate/understand how labeled data and model families produce predictions for discrete outcomes.
Read how Causal Inference for Data Science explains classifier →
Data Without Labels
Classification is a predictive modeling task that assigns observations to categorical outcomes or classes.
- How it is used
- Predicts categorical outcomes from labeled examples, including churn, document categories, and spam status.
- How deep it goes
- Defines classification against regression and illustrates logistic probability scores, but does not specify a classifier-training API.
- Examples
- Uses a telecom churn table, news categories, email spam filtering, and real-versus-synthetic data discrimination.
- What you can do after
- Evaluate/understand whether a prediction task calls for categorical classification rather than continuous regression.
The Art of AI Product Development
Classification is a supervised learning technique that assigns inputs to predefined categories or labels.
- How it is used
- Assigns new users to predefined segments so a product team can deliver tailored experiences at scale.
- How deep it goes
- Works through labeled-data preparation, model choice, held-out evaluation, tuning, and deployment without deriving the algorithms mathematically.
- Examples
- Uses purchase and activity records with segment labels, then shows segment-specific recommendations, nudges, and loyalty offers.
- What you can do after
- Evaluate/understand it using held-out users, precision, recall, and interpretability before relying on automated targeting.
Read how The Art of AI Product Development explains classifier →
Acing the CCNA Exam: Volume 2 Advanced Networking and Security
Classification is the process of identifying network packets or traffic and assigning them to classes based on attributes, contents, markings, or required treatment.
- How it is used
- Prioritizes important traffic and deprioritizes less important traffic during congestion by assigning packets to treatment classes.
- How deep it goes
- Explains class assignment with ACLs, NBAR, and markings, but provides no CLI configuration or verification procedure.
- Examples
- Uses voice, video, business applications, default traffic, social media, ACL matches, NBAR inspection, and marked packets.
- What you can do after
- Evaluate traffic-classification choices using header fields, payload inspection, traffic classes, and existing QoS markings.
Read how Acing the CCNA Exam: Volume 2 Advanced Networking and Security explains classifier →
Hugging Face in Action
Classification is the task of assigning an input to one or more predefined categories.
- How it is used
- Deploys pretrained models through high-level pipelines for sentiment, question, language, spam, and image categorization.
- How deep it goes
- Explains category assignment and pipeline usage with outputs, but defers detailed transformer architecture and model-training internals.
- Examples
- Uses movie and restaurant reviews, questions, Japanese text, spam messages, and a portrait for age-range classification.
- What you can do after
- Apply it via Hugging Face Transformers pipelines to classify text or images and inspect returned labels and scores.
Deep Learning with PyTorch, Second Edition
A supervised learning task that assigns a text sequence to one of several categories.
- How it is used
- Uses a sequence representation to assign text to a category, such as sentiment, spam, or topic.
- How deep it goes
- Explains why encoder output suits classification and contrasts it with simpler text representations, without working through a text-classifier training loop.
- Examples
- Illustrates possible categories with sentiment analysis, spam detection, and topic classification.
- What you can do after
- Evaluate/understand when an encoder representation is useful for assigning categories to text sequences.
Read how Deep Learning with PyTorch, Second Edition explains classifier →
Generative AI in Action
Text classification is the assignment of text to one or more predefined categories.
- How it is used
- Routes requests between models and filters prompts or responses within enterprise GenAI application pipelines.
- How deep it goes
- Explains routing and filtering roles with implementation examples, but stops short of mathematical classifier internals.
- Examples
- Demonstrates dog-question routing with Phi-2, policy-constrained product intents, and postgeneration screening.
- What you can do after
- Apply it via lightweight models, API classifiers, and response-processing layers to route, moderate, and constrain GenAI behavior.
Data-Driven Cybersecurity
Classification is the task of assigning observations to one or more predefined classes based on their attributes.
- How it is used
- Classifies network activity or threat-intelligence articles into risk-related categories to support cybersecurity review.
- How deep it goes
- Works through data preparation, training, prediction, and evaluation, while offering only simplified descriptions of model structure.
- Examples
- Uses login activity and network traffic labels, plus cybersecurity articles labeled high or low risk.
- What you can do after
- Evaluate classifier predictions using accuracy, precision, recall, F1-score, and a confusion matrix.
Statistics Every Programmer Needs
Classification is a modeling technique that assigns observations to predefined categories.
- How it is used
- Frames classification as supervised prediction of categorical outcomes and supports decisions involving labels or group membership.
- How deep it goes
- Demonstrates probability-to-label conversion and evaluation setup, without detailing individual classification metrics.
- Examples
- Uses raisin observations with MinorAxisLength, Perimeter, Class, probabilities, and binary predictions.
- What you can do after
- Apply it via Python, pandas, and NumPy to convert logistic probabilities into binary predictions and begin evaluating results.
Read how Statistics Every Programmer Needs explains classifier →
Introduction to Generative AI, Second Edition
A classifier is a model that assigns an input to one or more predefined categories or labels.
- How it is used
- Supports language-model safety by filtering data, labeling conditional-pretraining examples, detecting risky outputs, and evaluating responses.
- How deep it goes
- Defines classification through practical applications and limitations but stops short of implementation details or classifier architecture.
- Examples
- Uses product-review sentiment, toxic speech, and self-harm responses as classification examples.
- What you can do after
- Evaluate language data or model outputs against categories such as sentiment, toxicity, safety, or self-harm risk.
Read how Introduction to Generative AI, Second Edition explains classifier →
Grokking AI Algorithms, Second Edition
Classification is the assignment of an instance to one or more predefined categories based on its features.
- How it is used
- Uses feature patterns to assign examples to discrete categories in supervised learning.
- How deep it goes
- Defines classification, contrasts it with regression, and works through feature-based examples without developing classifier internals.
- Examples
- Uses vehicles, animals, computing devices, diamonds, and cat-or-dog decisions as classification examples.
- What you can do after
- Evaluate whether a problem predicts categories or continuous values and identify features suitable for classification.
Read how Grokking AI Algorithms, Second Edition explains classifier →
Build a Large Language Model (From Scratch)
The task of classifying text into predefined categories.
- How it is used
- Deploys fine-tuned language models for assigning text inputs to predefined classes.
- How deep it goes
- Explains tokenization, truncation, padding, labels, and batching, but defers the classifier model and optimization details.
- Examples
- Uses spam messages, binary labels, token-ID sequences, and batches shaped [8, 120].
- What you can do after
- Apply it via PyTorch datasets and data loaders to prepare labeled text for model fine-tuning.
Read how Build a Large Language Model (From Scratch) explains classifier →
Build a Text-to-Image Generator (from Scratch)
Classification is the task of assigning an input to one or more predefined categories.
- How it is used
- Uses classifiers to assign image inputs to categories and to steer diffusion sampling toward desired classes.
- How deep it goes
- Builds ViT and ResNet50 classification workflows, covering tokenization, attention, fine-tuning, validation, and early stopping.
- Examples
- Uses CIFAR-10 object categories, ViT patch tokens, diffusion class guidance, and real-versus-fake ResNet50 detection.
- What you can do after
- Build it from scratch as a ViT classifier, or adapt ResNet50 for labeled deepfake detection.
Read how Build a Text-to-Image Generator (from Scratch) explains classifier →
AI-Powered Search
Classification is a machine-learning task that assigns an input to one or more predefined classes.
- How it is used
- Uses binary document classification to transform learning-to-rank objectives into a generalizable search model.
- How deep it goes
- Explains classes, features, hyperplanes, generalization, and normalization, but stops short of detailed SVM mathematics.
- Examples
- Uses dog-versus-cat classification and relevant-versus-irrelevant search documents with BM25 features.
- What you can do after
- Evaluate how binary labels and feature boundaries can support generalizable search-relevance models.
How Large Language Models Work
Classification is the task of assigning an input to one of a set of discrete outcome categories.
- How it is used
- Uses labeled text outcomes to categorize new text, often with embeddings and simple machine-learning algorithms.
- How deep it goes
- Defines category prediction and outlines an embedding-based workflow, but stops short of mathematical or algorithmic derivation.
- Examples
- Uses A/B/C choices and net promoter score ratings as labeled outcomes for predicting categories on new text.
- What you can do after
- Apply classification by feeding text embeddings into logistic regression to predict discrete outcomes.
Read how How Large Language Models Work explains classifier →
Grokking Statistics
A classification model predicts a categorical label or class for an observation rather than a continuous numerical value.
- How it is used
- Distinguishes categorical prediction problems from continuous-value regression and guides the choice of classification tools.
- How deep it goes
- Defines class outputs and probability thresholding, then reaches validation metrics but stops short of multiclass treatment.
- Examples
- Uses spam detection and dog, cat, or bird image labels to illustrate binary and multiple-choice classification.
- What you can do after
- Evaluate classification performance using thresholds, precision, recall, and held-out data.
Related concepts
- sentiment analysisincludes · Sentiment analysis is the computational identification, classification, or measurement of opinions, attitudes, emotions, or evaluative polarity expressed in text or other data.
- multiclass classificationincludes · Multiclass classification is a supervised prediction task that assigns each input to exactly one of more than two possible classes.
- perceptronincludes · A perceptron is a single-layer computational model and linear classifier that combines weighted inputs with a bias and applies a threshold or activation rule.
- categorical dataproduces · Categorical data consists of values representing membership in a discrete set of named or ordered categories rather than measured numerical magnitudes.
- cross entropy lossaddressed by · A loss function that measures the discrepancy between a target probability distribution and predicted probabilities, commonly through the negative log probability assigned to target outcomes.
- NLIincludes · Natural language inference is the task of determining whether a hypothesis is entailed by, contradicts, or is neutral with respect to a premise.
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.






























