Capstone Project · Lesson 85

Evaluate on Held Out Data

Held-out evaluation is the final estimate after the pipeline, model family, hyperparameters and operating threshold have been fixed.

ConceptWorked examplePracticeKnowledge check
Textbook walkthrough

Evaluate on Held Out Data

Held-out evaluation is the final estimate after the pipeline, model family, hyperparameters and operating threshold have been fixed. It should be performed once on data not used for those choices.

Learning goal: explain why Evaluate on Held Out Data behaves this way, apply it to a small example, and verify the result independently. Begin by being able to justify this first step: Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis.

Deeper walkthrough

Read Evaluate on Held Out Data as a mechanism, not a recipe

Treat this as a sequence of observable decisions rather than one opaque command. Stage 1: Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis. Stage 2: Keep the stage inside the same data/validation definitions used by the rest of the project. Stage 3: Save the evidence produced by this stage so the next stage can be audited.

Mechanism

Follow the transformation

Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis.

Keep the stage inside the same data/validation definitions used by the rest of the project.

Save the evidence produced by this stage so the next stage can be audited.

Evidence

Know what would convince you

  • Confirm fitted transformations/models saw only training data.
  • Retain fold/test predictions so metrics can be recomputed independently.
Useful distinctionTraining evidence: Information allowed to influence fitted state.
Click a stage to inspect what happens, what changes, and what should be checked before moving on.
Stage 1

Freeze the procedure

Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis.

Verification focus: record the evidence you inspected and the condition that would make this stage fail.
How it works

Trace the mechanism step by step

  1. Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis.
  2. Keep the stage inside the same data/validation definitions used by the rest of the project.
  3. Save the evidence produced by this stage so the next stage can be audited.
Worked demonstration

Evaluate on Held Out Data evidence

Evaluate on Held Out Data evidence
Evidence: test metrics plus a saved prediction table with identifiers and observed/predicted outcomes.
Expected / illustrative result
The worked evidence makes the output of this project stage concrete and auditable.
Interpret the result.

For Evaluate on Held Out Data, trace the specific input through the mechanism above and independently verify one returned value, state change or side effect.

Distinctions & related ideas

Place the concept correctly

Training evidenceInformation allowed to influence fitted state.
Held-out evidenceIndependent observations used to estimate generalisation.
InterpretationWhat the result supports, with assumptions and limitations.
Use deliberately

When it is appropriate

Use Evaluate on Held Out Data when it answers a defined question in Capstone Project and its inputs/assumptions match the current data or program state.

Boundary conditions

When to stop or reconsider

Reconsider Evaluate on Held Out Data when the required information is unavailable, the operation would violate a validation/data boundary, or a simpler operation answers the question more transparently.

Common mistakes

Failure modes to recognise

  • Learning preprocessing/feature/model choices from held-out test information.
  • Comparing models under different splits or preprocessing and attributing the difference to the algorithm.
  • Turning an association or model explanation into an unsupported causal claim.
Verification

How to check the result

  • Confirm fitted transformations/models saw only training data.
  • Retain fold/test predictions so metrics can be recomputed independently.
  • Inspect errors/subgroups and compare with a baseline before generalising the conclusion.
Hands-on practice

Demonstrate understanding

Try this:

Construct a tiny example of Evaluate on Held Out Data. First freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis. Then keep the stage inside the same data/validation definitions used by the rest of the project. Predict the result before execution and explain one boundary or failure case.

List the stage inputs and expected artifact, rerun it from a clean state, and compare against a concrete acceptance check.
Knowledge check

Check reasoning, not memorisation

Which approach best demonstrates understanding of Evaluate on Held Out Data?

Quick reference

Remember the logic

Step 1Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis.
Step 2Keep the stage inside the same data/validation definitions used by the rest of the project.
Step 3Save the evidence produced by this stage so the next stage can be audited.
Lesson summary

What to remember

  • Held-out evaluation is the final estimate after the pipeline, model family, hyperparameters and operating threshold have been fixed. It should be performed once on data not used for those choices.
  • Freeze the procedure, predict raw test rows through the fitted pipeline, compute primary/secondary metrics and retain predictions for error analysis.
  • Learning preprocessing/feature/model choices from held-out test information.
  • Confirm fitted transformations/models saw only training data.