Skip to content
Aabha AI Academy
Skip to reading

Applied ML · Module 2

Answers and explanations · Make every label and feature earn its place

Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.

Lesson 02 · Targets, provenance and leakage

Exercise 02.1

  • queued_jobs: intake queue snapshot; legitimate predictor only if measured or reproducibly reconstructed at intake.
  • label_available_at: audit timestamp for the observed outcome; available after completion in the synthetic lab, forbidden in X.
  • priority: the original intake choice; permitted predictor. A later escalation status would not satisfy the same contract.
  • close_cost: closing measurement influenced by completed work; available after the outcome and forbidden in X.
  • job_id: assigned identifier, usually available at intake; retained for identity, joining and duplicate audits, excluded from the declared predictor list.

For example, close cost increases with realized duration in the generator. Using it would let the model reconstruct part of the answer from an unavailable closing value. Merely renaming it “operational value” would not change its availability.

Exercise 02.2

Only Q's label is available at Wednesday 09:00 because it was confirmed Tuesday 21:00. P completed before the fit but its label is not confirmed until Wednesday 10:00, so it cannot be used at that fit boundary. R remains unknown; do not label it on time or zero duration. Preserve P and R in the audit and apply a declared maturity/eligibility policy. Event time and availability time are distinct.

Exercise 02.3

First verify 100 unique intake IDs and inspect status counts per ID. A 260-row join is consistent with one-to-many status history, not 260 independent jobs. Determine which status version was valid and available at each intake; select or reconstruct that snapshot before the job-level join. Preserve later and conflicting versions in a separate audit rather than arbitrarily retaining the first row. Use a left join with relationship validation and a match indicator; inspect unmatched jobs and unexpected status-only IDs. Recheck 100 output jobs, uniqueness and no target-dependent filtering. A restored count without a valid snapshot rule is not enough.

Exit check 02.A

A historical label is intentionally constructed from an eventual outcome so the model can learn from known examples. The input must reconstruct what was available when that outcome was still unknown. One field can therefore be valid for retrospective labeling and invalid for prospective prediction.

Exit check 02.B

A gap constrains row or calendar separation, not actual reporting delay. Some outcomes can take longer or be confirmed later. Label-availability comparisons establish whether every included outcome existed at the relevant fit time; the embargo provides an additional design buffer.

Return to this module