Supervised and unsupervised learning
Learn the reasoning. Try the task. Compare your answer.
Prepared for DataCareerHub · Curriculum version 2026-10-15.1
By the end of this lesson
- Apply supervised and unsupervised learning to the fictional case.
- Record the rule, evidence and validation result.
- Explain a limitation and a defensible next step.
Fictional learning case · Local practice files · No personal data.
Understand the method
Supervised and unsupervised learning
Supervised learning uses example inputs with known targets to learn a prediction rule. Regression predicts a numeric quantity; classification predicts a category or its probability. Unsupervised methods look for structure without a labelled target, such as clusters of similar observations. A cluster is a mathematical grouping, not automatically a meaningful business segment or an externally validated label.
Work through the case
Cedar can predict actual_hours with regression or late with binary classification. These targets answer different questions. Predicting duration supports error measurement in hours; classifying lateness supports alert trade-offs. Clustering routes by distance and load would describe patterns but would not directly learn late outcomes. It also requires choices about scaling, cluster count and validation of usefulness.
A method you can reproduce
Classify a task by the output and available labels. Identify whether historical targets are observed consistently and whether missing outcomes bias the sample. Choose a simple descriptive report or rule when that answers the decision without ML. Define an evaluation method suited to the task before choosing a model. No unsupervised algorithm is required for the reference prediction workflow; this lesson teaches when that family would apply.
Check your reasoning
Calling a cluster high risk after looking at its average outcome is an interpretation that needs held-out validation. Do not imply that unsupervised learning discovers true categories or eliminates human assumptions.
Further reading: NumPy least squares, Preventing leakage, Cross-validation. These official references support the methods; the case and exercises are authored for DataCareerHub.
Practical exercise
Classify four requests: predict delivery hours, predict late/not late, group similar routes and summarise last month’s delays. Explain whether each needs labels or ML.
Write your answer in learner_worksheet.txt and retain the evidence file. Attempt this before opening the solution.
Open the worked solution
Hours is supervised regression; late/not late is supervised classification. Similar-route grouping is unsupervised and needs an explicit similarity definition. Last month’s observed delay summary is descriptive analysis and may need no ML at all. Labels are required for the supervised examples, with timing and coverage checks.
Independent extension: change one relevant input in a separate copy. Predict the result first, rerun the checks and explain any difference. Keep the supplied source unchanged.
One more question.
How these learning materials are prepared and maintained · Report a correction: support@datacareerhub.io
Read and practice without an account. Sign in with an existing account to save lesson completion.
Next lesson →This is a fictional learning case. Results do not establish real-world performance or causal effects. Portfolio practice is not a claim of client work or an accredited qualification. Explore practical lessons, worked examples and projects. Follow a published path, practise the method and build work you can explain.