الانتقال إلى المحتوى
Machine LearningSupervised Learning· 7 دقائق للقراءة

More Data Won't Fix Every Model: Reading Bias and Variance from Learning Curves

Extra rows shrink variance, not bias. A learning curve tells you which one you have before you pay for more labels.

ReadIn

مقال كل يوم يفرق معاك

21 نوفمبر 2026
  • كاتب موثّق
محتويات المقال

A team predicts a sensor reading with linear regression and gets an of 0.725 on a held-out test set, trained on 400 labeled rows. Labeling is slow and paid, but the fix seems obvious, so they buy more: 1,600 rows, then 6,400. Sixteen times the data later, the score is 0.732. Meanwhile, the same 400 rows with better features would have scored about 0.95. The data was never the bottleneck.

The common misconception

When a model performs poorly, many developers assume more training data is the fix. It's a sensible instinct:

  • "More data beats a cleverer algorithm" is a popular saying, and large models keep improving as their datasets grow.
  • It's exactly the right fix for : the scikit-learn user guide lists more training data as a way to reduce variance.
  • Data feels like the safe investment. It doesn't require changing the model, or even understanding why it fails.

The half-truth: more data cures one kind of error. A model can be wrong in two different ways, and only one of them shrinks as the dataset grows.

What actually happens

Before deciding what to fix, you need to know which kind of error you have.

Two ways to be wrong

scikit-learn's guide splits a model's generalization error into three parts. is the model's average error across different training sets: the mistake it makes every time, because it can't express the pattern. Variance is how much its predictions change when the training set changes: how much it chases the particular rows it happened to see. Noise is a property of the data, and nothing removes it.

Think of a bathroom scale that reads 2 kg too heavy versus one that jitters. Weighing yourself ten times and averaging fixes the jitter. It doesn't fix the 2 kg. More training rows are the averaging: they calm variance and leave bias where it was.

Why rows can't fix bias

The sensor data in the script comes from make_friedman1, a known nonlinear function that includes 10 * sin(pi * x0 * x1) and 20 * (x2 - 0.5) ** 2. A linear regression on the raw features predicts a weighted sum of them, and no weighted sum bends like a sine or a parabola. Extra rows only pin down the best flat approximation more precisely. The guide puts it plainly: collect more training data only if the true function is too complex to be approximated by an estimator with a lower variance.

Read it from a learning curve

A plots training and validation scores against the number of training rows. scikit-learn's learning_curve computes it with cross-validation, so you can run the "what if we had more data?" experiment on subsets of the data you already have.

Python
from sklearn.datasets import make_friedman1from sklearn.linear_model import LinearRegressionfrom sklearn.model_selection import train_test_splitX, y = make_friedman1(n_samples=10000, n_features=5, noise=1.0,                      random_state=0)X_pool, X_test, y_pool, y_test = train_test_split(    X, y, test_size=2000, random_state=0)# "The model is weak, so label 4x more data. Then 4x more."for n in [400, 1600, 6400]:    model = LinearRegression().fit(X_pool[:n], y_pool[:n])    print(f"{n:>5} rows  test R^2 {model.score(X_test, y_test):.3f}")#   400 rows  test R^2 0.725#  1600 rows  test R^2 0.730#  6400 rows  test R^2 0.732

The first script is the costly experiment, run for real: sixteen times the data buys 0.007 of R². The second prints three learning curves, and each one has a different shape.

Linear: high bias. Training and validation scores meet around 0.72 and stay there. When the model can't even fit its own training rows better than it predicts new ones, it's , and new rows will land on the same flat line.

Deep tree: high variance. Training stays at 1.000 because the tree memorizes every row, while validation climbs from 0.597 to 0.802 as the rows grow. The gap is closing. This is the case where more data pays off.

Cubic: bias removed. The same LinearRegression, fed powers and products of the features up to degree 3, scores 0.946 with just 400 rows. Its learning curve is almost flat too, but high: there's little left to gain from rows or from a cleverer model.

Flat curves tell you to stop

scikit-learn's user guide reads a naive Bayes model the same way: both scores converge to a fairly low value, so more data probably won't help much. Its learning curve example on handwritten digits shows another flat ending: an SVM's validation score rises and then plateaus, a sign that acquiring new data might not be useful anymore. When a stronger model plateaus too, the limit may be noise or missing information: no column in the data carries the rest of the answer. Then you need new features, not new rows.

Variance has cheaper fixes too

Even for high variance, data isn't the only lever. In scikit-learn's bias-variance example, bagging decision trees lowers the variance term from 0.0152 to 0.0092 while bias² rises only from 0.0003 to 0.0004, and total error drops from 0.0255 to 0.0196. Regularization and simpler models trade a bit of bias for less variance in the same way.

What the curves showDiagnosisWill more rows help?Try instead
Both scores low and close togetherHigh biasNoA more flexible model, better features, less regularization
Training high, validation much lower, gap closingHigh varianceYesMore rows, regularization, bagging
Validation flat, both scores highNear the limitBarelyAccept it, or find new information
Validation still rising at the largest sizeStill learningProbablyExtrapolate before you pay

How to apply it in your project

  1. Plot the curve before buying dataRun learning_curve on your current data with several training sizes, using the same metric you report.
  2. Read the gap firstSmall gap, low scores: bias. Large gap: variance. A training score near perfect with a low validation score is variance, whatever the dataset size.
  3. Fix bias with capacity and featuresTry a more flexible model family, add features such as polynomial or spline terms, or lower the regularization. Re-plot: the curves should rise together.
  4. Fix variance with data or constraintsMore rows, stronger regularization, tree limits such as min_samples_leaf, or bagging. Re-plot: the gap should shrink.
  5. Look for new information when both plateauIf every model flattens at the same level, ask what signal is missing from the columns, not how many rows to add.

Key takeaways

  • More training data reduces variance; it leaves bias untouched.
  • A learning curve shows which one you have: low, converged scores mean bias; a wide, closing gap means variance.
  • In the example, 6,400 rows lifted a linear model from 0.725 to 0.732, while better features reached 0.946 with 400.
  • When every model plateaus at the same level, look for new features, not more rows.

📚 المصادر

  1. Validation curves: plotting scores to evaluate models — scikit-learn User Guide
  2. Plotting Learning Curves and Checking Models' Scalability — scikit-learn examples
  3. Single estimator versus bagging: bias-variance decomposition — scikit-learn examples
  4. make_friedman1 — scikit-learn API Reference

التعليقات (0)