From a question to a learning problem
Distinguish prediction, classification, clustering, and generation, then define one supervised-learning task precisely.
Machine learning fits a mathematical rule from examples. The first skill is deciding what each example contains, what answer is available during training, and what decision the output will support. A house-price target is numeric, so it suggests regression; a flower species is categorical, so it suggests classification. Clustering has no supplied answer and can reveal groups, but the learner must interpret those groups. Generative models create new content from learned patterns and need different evaluation. For a small first experiment, load scikit-learn’s Iris dataset and write a one-sentence task specification: inputs, target, unit of observation, and intended use. Inspect the shape, feature names, class counts, and five rows. Then make a deliberately simple rule using petal length and record its errors. This separates the scientific question from the software. A model is useful only relative to a defined task, population, and error cost; high accuracy without those definitions says little.
Try it yourself
- Install Python, pandas, matplotlib, and scikit-learn, or open a free local Jupyter environment.
- Load sklearn.datasets.load_iris and inspect dimensions, fields, missing values, and class balance.
- Write and test one hand-built threshold rule before fitting a model.
You’re ready to move on when…
- Task statement names inputs, target, observation unit, and intended use.
- Notebook reports the dataset dimensions and class counts correctly.
- A confusion table exposes at least one error made by the hand-built rule.