Model Complexity and Algorithm Choice
When a model does not perform as well as you hoped, there are two broad levers to pull.
Why Twelve Rows Are Not Enough
Imagine you have studied a small table of customers and noticed a pattern that looks like a rule. Perhaps the rule says that older customers with few children, or customers who are not divorced, tend to buy a boat. Before you rely on that rule, you need to ask a basic question: how much evidence do you have that the pattern is real? The answer depends heavily on how many rows you examined.
The boat-buying example in the source uses a small table of 12 customer rows. From those rows, a rule was developed: if a customer is older than 45 and has fewer than 3 children, or is not divorced, then that customer wants to buy a boat. Now suppose 10,000 additional rows of customer data became available, and every one of them agreed with that rule. Think about how you would feel about the rule at that point.
What do you think happens?
Given 10,000 more rows that all agree with the rule, would you trust the rule more or less than you did based on the original 12 rows?
Reveal answer
More likely to believe the rule is a good one
The source states that you would be much more likely to believe the rule is a good one than you would have been based only on the original 12 rows. The reason is that agreement across many rows is harder to explain by chance.
How Evidence Accumulates Behind a Rule
A rule is a claim about the data. Each new row that matches the claim is another piece of evidence in its favor. When the rows are numerous and consistent with the rule, the claim becomes more believable. The reason is that the chance that the same agreement appeared by accident shrinks as the number of supporting rows grows.
The central idea is that confidence in a rule grows with the amount of data that supports it. Confidence does not jump to certainty in one step. Instead, it strengthens gradually as compliant rows accumulate. The diagram below traces this change for the boat example.
Confidence Is Not Certainty
Notice what this idea does not say. It does not say that a large dataset proves a rule is true in every case. It says that the rule deserves more confidence than it would have with a small sample. Confidence and certainty are different, and keeping them apart is one of the main habits this chapter builds.
Small Samples Can Mislead
A pattern that looks strong in a few rows may be an accident of which rows happened to be sampled. The source's key point is that matching percentages are not enough to judge a pattern. The number of supporting rows matters just as much. A rule that matches 100 percent of a tiny sample can still be unreliable, while a rule that holds across a large number of rows earns more trust.
Tuning Versus Gathering More Data
When a model does not perform as well as you hoped, there are two broad levers to pull. One is to adjust the model: change its settings, tweak its parameters, and tune it more carefully. The other is to gather more data. The source makes a practical point here. In many real situations you have some control over how much data you collect, and collecting more can be more beneficial than continued tweaking and tuning of the model.
| Investment | What it changes | When it is often the better choice |
|---|---|---|
| Tuning the model | Settings and parameters of the existing model | When the data is already large and the model settings are the open question |
| Gathering more data | The evidence the model learns from | When the data is small or limited, and you can realistically collect more |
Two levers for improving a model
The source also notes that this book works with datasets of fixed sizes. That is a teaching choice made to keep the examples manageable. It does not mean that dataset size is unimportant in practice. In the real world, the size of the dataset is often something you can decide to change.
Matching Model Complexity to Dataset Size
The source connects two ideas: the quantity of data and the complexity of the model. It says that having more data and building appropriately more complex models can often work wonders for supervised learning tasks. The word appropriately matters. A model's complexity is not something to maximize. It should be chosen with the amount of data in mind, so that a larger dataset can support a richer model while a smaller one may not.
A flexible model has more room to match the particular rows it was trained on, including the accidental quirks of a small sample. The diagram below contrasts a simpler model with a flexible one when data is limited. This illustrates the general reasoning, not a measured result from the source.
Worked Check on the Boat Rule
Judging the boat rule with two sample sizes
A rule was built from 12 customer rows: if a customer is older than 45 and has fewer than 3 children, or is not divorced, then that customer wants to buy a boat. Is the rule more trustworthy after 10,000 more rows that all agree with it?
- 1Identify the evidence in the original sample
The rule was developed from 12 rows, so the evidence is limited to those rows.
- 2Add the new supporting rows
Ten thousand additional rows arrive and every one agrees with the rule, giving 10,012 rows in total that are consistent with it.
- 3Ask whether agreement could be accidental
With a large number of agreeing rows, the chance that the same agreement appeared by accident is much smaller than with 12 rows.
- 4State the conclusion carefully
The rule deserves more confidence, but the agreement does not prove the rule is true for every customer.
The rule is much more believable than it was from 12 rows, but it is supported rather than proven.
Mistakes When Judging a Pattern
Common mistake Trusting a rule because its matching percentage is high
What it looks likeA rule matches every one of 12 rows, so it is treated as reliable.
Why it failsMatching percentages are not enough to judge a pattern. The number of supporting rows matters just as much.
Do this insteadCheck how many rows support the rule before deciding how much to trust it.
Common mistake Treating a large dataset as proof
What it looks likeAfter 10,000 agreeing rows, the rule is declared true for every customer.
Why it failsLarge agreement raises confidence but does not prove the rule in every case. Confidence and certainty are different.
Do this insteadDescribe the rule as better supported than before, and keep open the possibility of exceptions.
Common mistake Reaching for tuning first when data is limited
What it looks likeA model underperforms, so its settings are adjusted repeatedly without collecting any new rows.
Why it failsWhen data is limited, collecting more can be more beneficial than continued tweaking and tuning.
Do this insteadAsk whether more data is realistically available before spending more effort on model settings.
Common mistake Choosing the most complex model regardless of data size
What it looks likeA highly flexible model is used on a small table because it can fit the rows closely.
Why it failsComplexity should be chosen in light of the amount of data. A flexible model fitted to a small sample may fit accidental quirks.
Do this insteadMatch model complexity to the amount of available data.
Practice: Judging a Customer Pattern
A colleague found a rule in a table of 15 customers: customers who are not divorced tend to buy a boat, and all 15 of them fit the pattern. Another colleague says the rule is now proven because it has perfect agreement. Using the ideas from this article, explain whether the rule is proven, what evidence would make it more believable, and whether you would first tune a model or collect more customer rows.
Hints
- Separate confidence from certainty.
- Ask how many rows support the pattern, not only what percentage matches.
- Consider whether more data is realistically available before adjusting model settings.
Key Takeaways
- A rule becomes more believable as more compliant data accumulates, but this raises confidence rather than proving the rule.
- The number of supporting rows matters as much as the matching percentage when judging whether a pattern is reliable.
- When data is limited, collecting more data is often more beneficial than repeatedly tuning a model.
- Model complexity should be chosen in light of the amount of data, since more data can support appropriately more complex models.