You need to estimate how long a workshop recording takes to caption. You could inspect every file by hand, or use previous jobs to make a first estimate. What would it mean for a computer to learn that estimate?
Before you begin: Read the NLP introduction. You only need averages and simple multiplication.
Make the prediction concrete
Suppose your small, invented dataset contains these jobs:
| Recording length | Captioning time |
|---|---|
| 10 minutes | 25 minutes |
| 20 minutes | 45 minutes |
| 30 minutes | 65 minutes |
The recording length is an input feature, a measurable property available when you need the prediction. The captioning time is the target, the quantity you want to predict. A model is a rule with adjustable values. Here, “twice the recording length, plus five minutes” matches all three rows.
Write it as prediction = a × length + b. The values a and b are parameters. In this example, a = 2 and b = 5. Learning means adjusting parameters using data and a definition of error. It does not require the computer to understand captioning as a person does.
What makes one rule better?
Try a second rule: always predict 45 minutes. Its errors on the three jobs are 20, 0, and 20 minutes. The first rule has zero error on these invented rows. An error score used during training is called a loss. Mean absolute error averages the sizes of the mistakes, ignoring whether a prediction is too high or too low.
For the constant rule, that score is (20 + 0 + 20) / 3, about 13.3 minutes. This is a training score, because we used the same data to choose and inspect the rule. It is not yet evidence about tomorrow's work.
Different losses encourage different behavior. Squaring errors makes a large miss count disproportionately. If underestimating a deadline is especially costly, you may need a decision policy that accounts for that cost instead of using a single average.
Hide a few answers from yourself
Reserve some jobs as a test set before choosing the model. Use the training set to fit parameters, a separate validation set to choose between approaches, and the test set for a final check after those choices. With very little data, other evaluation designs may be more efficient, but the principle stays the same: do not grade a decision only on the examples that shaped it.
A new 40-minute recording takes 130 minutes because its audio is poor. Our rule predicts 85. The model did not suddenly forget arithmetic. Recording length alone leaves out an important cause of the work. Adding an audio-quality feature might help, if it is measured consistently and available before the job starts.
Generalization means useful performance on new cases drawn from the situation you care about. Overfitting happens when a model captures peculiarities of its training examples that do not carry over. A complicated formula can pass exactly through three points while being a poor prediction rule elsewhere.
Look for answers leaking into inputs
Suppose the dataset includes the final invoice. The invoice may almost reveal how long captioning took. A model using it could score extremely well, but the invoice does not exist when you make the estimate. This is data leakage: evaluation uses information that the deployed system would not legitimately have.
Near-duplicate recordings can leak information across a random split too. If you have several versions of the same recording, keep them together when splitting data. If the deployment predicts future jobs, a time-based split may better reflect that setting.
Not all learning uses the same targets
Predicting duration from completed jobs is supervised learning, where examples include targets. Unsupervised methods look for structure without those explicit task labels. Self-supervised learning creates prediction targets from the data itself, as when a language model predicts a missing or next piece of text. Reinforcement learning uses feedback about actions and their consequences. These are different setups, not a ladder from simple to intelligent.
Decide what to fix
Your model is accurate on clear audio but consistently underestimates noisy recordings. Would you first make the model ten times larger, improve the input data, or change the color of its dashboard? Explain what evidence would change your choice.
Examine the failure
Start by checking the noisy-audio examples and whether the inputs capture audio quality. More capacity cannot reliably infer a missing factor from no evidence. If quality is represented and the model still fails on enough representative examples, model capacity or the training procedure becomes a stronger suspect. The useful next step depends on the observed failure, not a general preference for bigger models.
Next we will replace this small formula with a network of learned transformations and see what “deep” adds.
Further reading
Google's Machine Learning Crash Course explains loss, datasets, and generalization. All times above are invented to make the reasoning inspectable.