Skip to content

9.7 Beyond One Feature: Building Better Predictive Models

9.7 Beyond One Feature: Building Better Predictive Models

Section titled “9.7 Beyond One Feature: Building Better Predictive Models”

Throughout this chapter, we have deliberately used an extremely simple example. We attempted to predict protein stability using only a single biological feature: hydrophobicity.

Although this example allowed us to introduce the fundamental principles of supervised learning, it also highlights an important limitation.

Protein stability is determined by many molecular mechanisms acting simultaneously.

Hydrophobic interactions are certainly important, but they are only one component of a much larger physical picture. Other factors include

  • electrostatic interactions,
  • hydrogen bonding,
  • van der Waals interactions,
  • disulfide bonds,
  • conformational flexibility,
  • ligand binding,
  • protein size,
  • solvent accessibility,
  • and evolutionary constraints.

Consequently, it would be surprising if hydrophobicity alone were sufficient to predict protein stability accurately.

Fortunately, supervised learning is not limited to a single input variable.

Instead, it naturally allows us to combine multiple biological features into a single predictive model.


Suppose we decide to include not only hydrophobicity but also the overall surface charge of each protein.

Instead of describing every protein by one feature,

x,x,

we now describe it by two features,

x1andx2.x_1 \quad\text{and}\quad x_2.

Our regression model becomes

y^=m1x1+m2x2+c.\hat{y} = m_1x_1 + m_2x_2 + c.

The interpretation remains exactly the same as before.

Each coefficient quantifies how strongly its corresponding feature contributes to the predicted biological property.

For example,

  • (m_1) measures the contribution of surface charge,
  • while (m_2) measures the contribution of hydrophobicity.

Learning again consists of estimating these parameters from experimental data.

Nothing about the optimization problem changes.

Only the number of parameters has increased.


Adding a second feature changes the geometry of the model.

Previously, every protein was represented by a single coordinate on the horizontal axis.

The regression model was therefore a straight line.

With two input features, each protein is described by two coordinates.

The data now occupy a three-dimensional space:

  • one axis for surface charge,
  • one axis for hydrophobicity,
  • and one axis for protein stability.

The regression model is no longer a line.

It becomes a plane passing through the cloud of observations.

Although the visualization is slightly more complex, the underlying principle remains identical.

The algorithm still seeks the model parameters that minimize the Mean Squared Error.

Whether the model is represented by a line, a plane, or a higher-dimensional surface is purely a consequence of the number of input features.


Adding more features introduces additional model parameters.

Instead of optimizing only one regression coefficient, we now estimate several simultaneously.

Consequently, the loss function depends on multiple variables,

MSE(m1,m2,).\mathrm{MSE}(m_1,m_2,\ldots).

The gradient therefore also becomes multidimensional,

MSE=(MSEm1,MSEm2,).\nabla \mathrm{MSE} = \left( \frac{\partial \mathrm{MSE}}{\partial m_1}, \frac{\partial \mathrm{MSE}}{\partial m_2}, \ldots \right).

Each component tells us how one particular parameter should change in order to reduce the prediction error.

Gradient descent updates all parameters simultaneously.

Although the mathematics becomes more elaborate, the underlying learning process is unchanged.

Every iteration still follows exactly the same procedure:

  1. Compute the gradient.
  2. Update the parameters.
  3. Evaluate the new model.
  4. Repeat until convergence.

The remarkable aspect of gradient descent is that this procedure scales almost effortlessly from one parameter to millions.


Two input variables are convenient for visualization, but real biological datasets are rarely so simple.

Modern bioinformatics routinely analyzes datasets containing hundreds, thousands, or even millions of variables.

For example, a protein sequence may be represented by features describing

  • amino acid composition,
  • physicochemical properties,
  • predicted secondary structure,
  • intrinsic disorder,
  • evolutionary conservation,
  • structural motifs,
  • solvent accessibility,
  • and many other characteristics.

Similarly, a transcriptomics experiment may measure the expression levels of tens of thousands of genes simultaneously.

Machine learning algorithms are specifically designed to operate in such high-dimensional spaces.

Although humans cannot visualize these spaces, the mathematical principles remain exactly the same.

Each biological sample is represented as a point in a high-dimensional feature space, and the learning algorithm searches for the parameter values that best explain the observed biological responses.


From feature engineering to representation learning

Section titled “From feature engineering to representation learning”

Historically, most predictive models relied heavily on manually designed features.

Researchers carefully selected biological measurements that they believed would be informative for the prediction task.

This approach, known as feature engineering, remains extremely valuable because it incorporates decades of biological knowledge into the learning process.

Recent advances in deep learning have introduced a different strategy.

Instead of requiring researchers to design informative features explicitly, neural networks often learn useful internal representations directly from raw data.

For example, modern protein language models are trained directly on amino acid sequences.

Rather than calculating hydrophobicity or charge beforehand, the neural network learns representations that capture structural, evolutionary, and functional information automatically.

This process is called representation learning.

Interestingly, many learned representations correspond closely to biologically meaningful concepts that had previously been identified through feature engineering.

Thus, deep learning does not replace biological knowledge.

Instead, it provides new ways of discovering useful biological representations.


Our protein stability example demonstrates a principle that extends far beyond proteins.

Every supervised learning problem consists of three essential components.

First, biological observations must be represented numerically.

Second, a mathematical model relates these features to the quantity of interest.

Third, an optimization algorithm estimates the parameters that best explain the experimental data.

The complexity of the model may increase dramatically.

A linear regression model may contain only two parameters.

A modern transformer architecture may contain billions.

Yet the conceptual workflow remains unchanged.

This observation is perhaps the most important lesson of the chapter.

Machine learning is not defined by any particular algorithm.

It is defined by a general framework for learning predictive relationships from data.

The methods become more sophisticated, but the underlying principles remain remarkably stable.

Understanding these principles makes it much easier to appreciate the more advanced models that follow in subsequent chapters.


After completing this section, you should be able to

  • explain why biological prediction usually requires multiple features,
  • understand how multiple linear regression extends simple linear regression,
  • describe how gradient descent naturally generalizes to multiple parameters,
  • explain why modern biological datasets are high-dimensional,
  • distinguish between feature engineering and representation learning.

Real biological phenomena are rarely determined by a single variable. Multiple linear regression extends simple regression by combining several biologically meaningful features into a single predictive model. Although the number of model parameters increases, the optimization procedure remains unchanged. Modern machine learning methods further extend this idea by learning informative representations directly from data, enabling prediction in extremely high-dimensional biological systems.

  1. Why is one biological feature often insufficient for accurate prediction?
  2. How does multiple linear regression extend simple linear regression?
  3. What geometric object replaces the regression line when two input features are used?
  4. How does the gradient change when additional model parameters are introduced?
  5. Why can gradient descent still be applied efficiently in high-dimensional spaces?
  6. What is the difference between feature engineering and representation learning?
  7. Why do the conceptual foundations of supervised learning remain valid even for modern deep learning models?