LearnViz CompSci
Home / Learn / AI & Machine Learning / Features and Labels

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

  1. Features are the input attributes.
  2. Here size, rooms and age describe a house.
  3. The label is the target to predict, price.
  4. Good features make learning easier.
  5. 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

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. 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?
Input attributes and the target to be predicted. It belongs to AI & Machine Learning and is a beginner-level topic.
Where do people use Features and Labels?
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.
What is the most common mistake with Features and Labels?
Leakage features that encode the label or future information produce models that fail in production.
What should I learn before this topic?
Start with Training and Test Sets, the topic just before it in AI & Machine Learning.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the AI & Machine Learning quiz.
Is Features and Labels hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Features and Labels?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Features and Labels?
Training and Test Sets, Linear Regression, Reinforcement Learning Basics are closely connected. The full list is in the related topics section of this page.
What should I study after Features and Labels?
Continue with Linear Regression, the next topic in AI & Machine Learning.

Related topics