Ch 2 · Data — Features, Labels & Splitting · Machine Learning & AI
Topic 2 of 13 in Machine Learning & AI — Foundations — 2 lessons.
Features and Labels
Every row of training data has two parts: the inputs a model learns from, called features, and the answer you want it to predict, called the label. Telling them apart is the first step in any supervised project. In the example, each row pairs hours studied with a pass (1) or fail (0), and the code separates them into a features list and a labels list.
Train / Validation / Test
To know if a model really learned (vs memorised), you hide some data from it. Split your examples into three buckets:
All topics in Machine Learning & AI Beginner
- What Is Machine Learning?
- Data — Features, Labels & Splitting
- Linear Regression — Fitting a Line
- How Models Learn — Gradient Descent
- Classification — Predicting Categories
- Decision Trees
- Evaluating a Model Honestly
- Overfitting & the Bias-Variance Tradeoff
- The ML Workflow
- Mini-Project — A Spam Classifier
- Clustering — Finding Groups Without Labels
- Your First Real scikit-learn Model
- Words as Numbers — A Taste of NLP