Beginner Topic 7 of 51 AI & Machine Learning
Features and Labels
Input attributes and the target to be predicted.
How it works
Features are the input variables describing each example, such as age, income or pixel values, and the label is the target the model should predict, such as default or not, or the price. Features can be numeric, categorical, text, image or time series, and they are encoded into numeric vectors the model can use. Good features capture information relevant to the label, and a dataset is a table whose rows are examples and columns are features plus the label.
Step-by-step walkthrough
- Features are the input attributes.
- Here size, rooms and age describe a house.
- The label is the target to predict, price.
- Good features make learning easier.
- Categorical features are encoded and numbers are often scaled.
Where it is used
Choosing and constructing features, as in a house-price model using area, location and age, determines what a model can learn and is often more important than the algorithm.
Common pitfall
Leakage features that encode the label or future information produce models that fail in production. Unscaled or poorly encoded categorical features hurt many algorithms. Missing values need a strategy. Label noise and inconsistent definitions limit accuracy. Document how each feature is computed, check for leakage and keep training and serving pipelines consistent.
Where it fits in the course
Features and Labels is topic 7 of 51 in AI & Machine Learning, rated Beginner. It follows Training and Test Sets. The next topic is Linear Regression.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the AI & Machine Learning quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the AI & Machine Learning quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Features and Labels?
Where do people use Features and Labels?
What is the most common mistake with Features and Labels?
What should I learn before this topic?
How can I practice it?
Is Features and Labels hard to learn?
How long does it take to learn Features and Labels?
Which topics are related to Features and Labels?
What should I study after Features and Labels?
Related topics
- Training and Test Sets (AI & Machine Learning)
- Linear Regression (AI & Machine Learning)
- Reinforcement Learning Basics (AI & Machine Learning)
- Logistic Regression (AI & Machine Learning)