liveBook · Manning

Chapter 5: Classification: Cytochrome P450 Inhibition

What you will learn in chapter 5 of Build AI Drug Discovery Pipelines

Introduces drug metabolism as a drug-discovery concern and explains why changes in cytochrome P450 activity can affect drug exposure and interactions.

After this chapter you will be able to

What it builds on

Section by section

Introduction

Introduces drug metabolism as a drug-discovery concern and explains why changes in cytochrome P450 activity can affect drug exposure and interactions.

Key terms: metabolism, xenobiotics, clearance, drug metabolites, Cytochrome P450, CYP, CYP-mediated metabolism, reactive metabolites, CYP inhibition, CYP3A4

5.1 Binary Classification of CYP3A4 Inhibition

The section frames CYP3A4 inhibition as a binary classification task and introduces logistic regression as a model for it.

Key terms: CYP 3A4, inhibitor, binary classification, logistic regression, binary outcomes, classification

5.1.1 Logistic Regression in Theory

The section explains how logistic regression turns a linear signal into a binary CYP3A4 inhibition prediction and trains that model with binary cross-entropy loss.

Key terms: signal, weights, sigmoid function, logistic function, decision boundary, noninhibitor, inhibitor, binary cross-entropy (BCE) loss, true class, predicted probability

5.1.2 Logistic Regression in Practice

This section applies logistic regression to CYP3A4 inhibition data and shows why its validation accuracy should be considered alongside a baseline, precision, recall, and probability estimates.

Key terms: accuracy, validation set, class imbalance, dummy model, precision, recall, class predictions, probability estimates, predict(), predict_proba()

5.1.3 (Mis)calibration: Questioning Probabilistic Output Assumptions

This section explains how to assess and improve logistic regression probabilities, evaluate classification across decision thresholds, and interpret logistic regression weights for CYP3A4 inhibition.

Key terms: predicted probabilities, well calibrated, miscalibration, reliability plot, bins, RMSCE, Brier score, underconfident, overconfident, Platt scaling

5.2 Tree-based Models

Introduces decision trees as classifiers that reach predictions through a sequence of feature-based decisions.

Key terms: decision tree, feature, node, root node, branch, leaf node

5.2.1 Decision Trees

This section shows how a decision tree classifies molecules, how CART chooses its splits, and what makes trees useful and limited.

Key terms: decision criteria, Gini, samples, value, class, root node, leaf node, class predictions, probability estimates, top-down

5.2.2 Dealing with Data Set Imbalance

Explains why class imbalance can harm CYP3A4 inhibitor classification and compares data-level and algorithm-level ways to address it.

Key terms: class imbalance, minority class, majority class, CYP3A4 inhibition, Random Undersampling, Random Oversampling, SMOTE, downsampling, upsampling, data set augmentation

5.3.1 Decision Tree Bias-Variance Trade Offs

This section explains why decision trees can have low bias but high variance, how regularization and pruning address that trade-off, and how to compare tree models more reliably.

Key terms: hypothesis space, low bias, high variance, training set, regularization, max_depth, max_features, max_leaf_nodes, min_samples_split, min_samples_leaf

5.3.2 Random Forests: A Strong Collective of Weak Decision Trees

This section explains how random forests combine decision trees, how to evaluate and interpret their predictions, and how to assess whether predictions are trustworthy for new molecules.

Key terms: ensemble learning, bagging, bootstrap sampling, Random Forests, feature subsampling, out-of-bag (OOB) evaluation, OOB samples, OOB PR AUC, feature importance, impurity reduction

5.3.3 Multi-Instance Learning: Model-agnostic Ensemble Learning

This section explains multi-instance learning through molecular conformers and compares two ways to combine conformer information into a molecule-level prediction.

Key terms: multi-instance learning, MIL, bag, instance, conformational sampling, conformers, CYP 3A4 inhibition, bag-wrapper MIL, instance-wrapper MIL, descriptors

5.4 Multiclass & Multilabel Classification

This section distinguishes binary classification from multiclass classification by the number of possible classes and explains what a multiclass model predicts.

Key terms: binary classification, multiclass classification, classes

5.4.1 Multiclass Classification

This section explains how softmax regression and random forests handle multiclass prediction, then shows why mutually exclusive classes do not fit CYP inhibition.

Key terms: softmax regression, softmax function, weight matrix, cross-entropy loss, Random Forests, multiclass classification, probability estimate, multiclass scenario, CYPs, one and exactly one CYP

5.4.2 Multilabel Classification

This section frames CYP inhibition as a multilabel problem and explains how to prepare data, train models, and evaluate predictions across five CYP labels.

Key terms: multiclass classification, multilabel classification, multioutput classification, CYP inhibition, softmax regression, logistic function, MultiOutputClassifier, Random Forests, correlated labels, CYP inhibitor data sets

5.5 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 4: Solubility Deep Dive with Linear Models Chapter 6: Case Study: Small Molecule Binding to an RNA Target →

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.