Skip to content

9.3 Linear Regression - The Simplest Predictive Model

9.3 Linear Regression: The Simplest Predictive Model

Section titled “9.3 Linear Regression: The Simplest Predictive Model”

From biological hypotheses to mathematical models

Section titled “From biological hypotheses to mathematical models”

Once biological observations have been represented as numerical features, we can begin constructing predictive models.

At its core, supervised learning seeks to answer a deceptively simple question:

Can we use one or more measurable biological properties to predict another biological property?

In our example, we ask whether the hydrophobicity of a protein can be used to predict its thermal stability.

Suppose we measure the hydrophobicity of many proteins and plot these values against their experimentally determined melting temperatures. Rather than forming completely random points, we often observe a general trend: proteins with greater hydrophobicity tend to be more stable.

The relationship is clearly imperfect, but it suggests that hydrophobicity contains useful predictive information.

The next step is to translate this biological observation into a mathematical model.


Many mathematical functions could potentially describe the relationship between hydrophobicity and protein stability.

We might choose

  • a linear function,
  • a quadratic function,
  • an exponential relationship,
  • or a highly flexible nonlinear model.

Which should we choose?

A common misconception is that more complicated models are automatically better.

In science, however, we usually follow the opposite philosophy.

We begin with the simplest model that is capable of describing the observed relationship.

This principle is closely related to Occam’s Razor, which states that unnecessary complexity should be avoided.

If the data suggest an approximately linear relationship, then a straight line is a natural starting point.

Its simplicity provides two important advantages.

First, it is easy to interpret biologically.

Second, it establishes a baseline against which more sophisticated models can later be compared.

Linear regression is therefore not interesting because biological systems are linear.

It is interesting because it introduces the fundamental concepts of supervised learning in their simplest possible form.


A straight line can be described mathematically by

y^=mx+c.\hat{y}=mx+c.

This equation contains four different quantities, each with a specific interpretation.

The variable

xx

represents the observed biological feature.

In our example,

xx

is the hydrophobicity of a protein.

The quantity

y^\hat{y}

is the predicted protein stability.

The hat is important.

It reminds us that this value is not measured experimentally but estimated by the model.

The remaining two quantities,

mandc,m \quad\text{and}\quad c,

are the model parameters.

The slope (m) determines how strongly protein stability changes as hydrophobicity increases.

The intercept (c) specifies the predicted stability when the feature value equals zero.

Although the intercept is mathematically necessary, it often has little biological meaning. For many biological variables, a feature value of zero may never occur in reality. The intercept simply ensures that the regression line can be positioned freely within the data.

This distinction illustrates an important point.

Not every parameter in a mathematical model corresponds directly to a biological mechanism.

Some parameters exist primarily to improve the mathematical description.


Once the regression model has been specified, it can generate predictions.

For every protein in the dataset, the measured hydrophobicity is inserted into the regression equation, producing a predicted stability,

y^.\hat{y}.

These predictions can then be compared with the experimentally measured values,

y.y.

If the model were perfect, every prediction would exactly match the corresponding observation.

All measured proteins would lie precisely on the regression line.

Real biological systems, however, are never this simple.

Instead, the observed data form a cloud of points surrounding the regression line.

Some proteins are slightly more stable than predicted.

Others are slightly less stable.

The differences between predictions and observations are not merely experimental imperfections.

Rather, they reflect the complexity of biology itself.


The scatter around the regression line is often described as noise, but this term should not be misunderstood.

Noise does not imply that the observations are meaningless.

Instead, it reflects the fact that biological systems are influenced by many factors simultaneously.

Several sources contribute to this variability.

Biological variation arises because living systems are inherently complex. Even proteins with similar hydrophobicity may differ in sequence, folding pathways, structural flexibility, or interaction partners.

Experimental variation results from unavoidable measurement uncertainty. No experimental technique produces perfectly reproducible observations.

Finally, model limitations contribute to the remaining differences.

Our regression model assumes that protein stability depends only on hydrophobicity.

In reality, stability is influenced by numerous additional properties, including electrostatic interactions, hydrogen bonding, disulfide bridges, molecular packing, ligand binding, and many others.

Consequently, the regression line should not be viewed as an exact description of protein folding.

Instead, it represents our best approximation given the biological information included in the model.


This observation leads to one of the most important philosophical ideas in computational biology.

A mathematical model should not be judged by whether it is true.

Instead, it should be judged by whether it is useful.

No regression model can perfectly describe the molecular mechanisms governing protein folding.

Even the most sophisticated deep learning models remain approximations of biological reality.

Their value lies not in perfectly reproducing nature, but in capturing enough of the underlying biology to make useful predictions.

Consequently, model development is always a balance between two competing goals.

On one hand, the model should be simple enough to understand and interpret.

On the other hand, it should be sufficiently flexible to capture the relevant biological relationships.

Finding this balance is one of the central themes of machine learning and will become increasingly important in the following chapters.


After completing this section, you should be able to

  • explain why linear regression is an appropriate starting point for supervised learning,
  • interpret the parameters of a linear regression model,
  • distinguish between predicted and observed values,
  • explain why biological data rarely lie exactly on a regression line,
  • understand why mathematical models are evaluated by their usefulness rather than their realism.

Linear regression is the simplest predictive model used in supervised learning. It assumes an approximately linear relationship between a biological feature and the quantity to be predicted. The model generates predictions that can be compared with experimental observations. Differences between predictions and observations arise from biological variability, experimental uncertainty, and limitations of the model itself. Rather than seeking perfect realism, scientific models aim to capture the essential biological relationships while remaining interpretable and useful.

  1. Why is linear regression a good starting point for studying supervised learning?
  2. What do the parameters (m) and (c) represent in a linear regression model?
  3. What is the difference between (y) and (\hat{y})?
  4. Why do biological observations rarely lie exactly on the regression line?
  5. Why are scientific models considered useful approximations rather than exact descriptions of reality?