liveBook · Manning

Coefficient of determination

As explained in Build AI Drug Discovery Pipelines

R2 is the coefficient of determination measuring the proportion of target variance explained by a fitted model.

R² measures how well a fitted model accounts for variation in the target. It ranges from 0 for poor fit to 1 for perfect fit, but can be negative on test data. section 4.1.4

Use R² with care when comparing models:

  • Higher R² indicates a better fit to observed data, but R² never decreases when features are added, even when they are unhelpful. section 4.1.4
  • Compare adjusted R² when model size matters; unlike R², it decreases when an added feature fails to improve the model beyond chance. section 4.1.4
  • Separate fit from prediction: QSAR candidates were screened with training R² and unseen-data Q², a predictive counterpart to R². section 6.3.1

Solubility and ligand-binding models

A linear regression predicts solubility from logP and evaluates predictions with scikit-learn’s r2_score. In a small QSAR workflow, Lasso selects descriptors, cross-validation selects models, and candidates must achieve R² > 0.7 on training data and Q² > 0.7 on unseen data. section 4.1.4 section 6.3.1

R2=1-MSEVar(y)

Inspect the compact equation connecting R² to mean squared error and target variance. section 4.1.4

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines the metric, gives its equation and limitations, and applies it through linear-regression and QSAR evaluation.
Examples
Uses logP-based solubility regression and small-molecule ligand QSAR model screening with R² and Q² thresholds.
What it assumes
Assumes basic regression vocabulary while defining residuals, target variance, MSE, MAE, and adjusted R².
What you can do after
Evaluate regression fit, recognize feature-count inflation, and distinguish training performance from predictive performance.
How it connects
Connects regression evaluation with mean squared error, mean absolute error, adjusted R², cross-validation, Lasso regression, and QSAR.

Also explained in

Compare how 9 books explain coefficient of determination →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.