topskill.dev
CoursesTracks
All courses/Machine Learning FundamentalsFeatures and labels
Foundations and the ML process
2 / 8
← Machine Learning Fundamentals
○What machine learning learns●Features and labels○Training and inference○Regression or classification○The machine learning process○Data quality and coverage○Representing data✦Module Quiz
○Linear regression○Try a tiny linear model○Logistic regression○Nearest neighbors○Decision trees○Random forests○Boosting○Naive Bayes○Support vector machines✦Module Quiz
○Clustering○K-means○Choosing and interpreting clusters○Principal component analysis○Neural networks and deep learning○Self-supervised learning○Transfer learning○Reinforcement learning✦Module Quiz
○Generalization and overfitting○Holding out evaluation data○Data leakage○Baselines○Bias and variance intuition○Reading learning curves✦Module Quiz
○Prediction errors and residuals○Measuring regression error○Squared error and large misses○The confusion matrix○Precision and recall○Try a held-out classifier✦Module Quiz
○Bias and limits○Monitoring and drift○Comparing models for a decision✦Module Quiz
Foundations and the ML process

Features and labels

A feature is an input supplied to a model. A label, also called the target, is the answer a supervised model learns to predict. One row usually represents one example, such as one delivery.

RecordFeature: distance (km)Feature: queue at dispatchLabel: duration (minutes)
A2014
B4325
C6129

These are invented values for explaining the structure. The record identifier names a row; it is not automatically a useful feature. The duration column is a label because duration is the chosen prediction target.

Supervised learning uses examples with known targets. Targets may come from measurements, later events, or human judgments. They are not necessarily correct: an incorrectly stopped timer creates a misleading duration label.

Define the prediction moment as well as the target. Distance and the current queue may be available at dispatch. Actual arrival time is not available then and must not be used as an input to predict the same delivery's duration.

A column's role depends on the task. A measured duration could be an input for a later analysis, but it cannot be an input to an earlier prediction that requires knowing that duration in advance.

Check your understanding

When predicting duration from distance and queue length, which value is the label?

Answer: Duration is the label; distance and queue length are features.

Fact 1
1 / 1
FACT 1

Duration is the label; distance and queue length are features.