Turn a real prediction question into features, a target, and a clear success goal.
Problem
Predict exam score from study hours. Students study different numbers of hours and get different scores. Build a rule that predicts the score for a new student from hours studied.
Diagram — Feature → Model → Target
Teaching points
Feature (X): input you already know — study hours.
Target (y): value you want to predict — exam score.
Train rows: used to learn the rule.
Test rows: held out to check if the rule generalizes.
1Collect data
Pairs of hours and scores.
2Name X and y
Hours → score.
3Split
Train to learn, test to check.
4Success
Low error on unseen hours.
Remember: A clear problem statement comes before any formula or library.