What Are We Given?
Before building a Machine Learning model, we need to understand what information we actually have. The model can only learn from the data that we provide.
Before asking what the model should predict, ask what information is available.
The available information becomes the input to the Machine Learning system. Understanding that input is one of the first steps in defining the problem.
Start With the Data
Imagine that we want to predict the price of a house.
What information could we have about the house?
- Size of the house.
- Number of bedrooms.
- Number of bathrooms.
- Location.
- Age of the house.
These pieces of information are available before making the prediction.
These Become Inputs
The information we provide to the model is called input data.
For example, one house might look like this:
Size: 1,500 sq ft
Bedrooms: 3
Bathrooms: 2
Age: 8 years
The model can use these values to learn patterns related to house prices.
What Is a Feature?
Each individual piece of useful information about an example is called a feature.
In our house example:
- Size is a feature.
- Number of bedrooms is a feature.
- Number of bathrooms is a feature.
- Age is a feature.
Features describe the example that the model is working with.
A feature is a piece of information used to describe an example and help the model make a prediction or decision.
Different Problems Give Us Different Data
The information we receive depends on the problem we are trying to solve.
For an email spam problem, the available information could include the email text, sender information, links, and other characteristics.
For a customer problem, we might have purchase history, number of orders, spending amount, and website activity.
One Example vs Many Examples
Machine Learning usually does not learn from only one example.
We normally have many examples.
House 1: 1,000 sq ft, 2 bedrooms, $300,000
House 2: 1,500 sq ft, 3 bedrooms, $420,000
House 3: 2,000 sq ft, 4 bedrooms, $550,000
Each house is an example. Across many examples, the model can look for relationships between the features and the outcome.
What Information Is Actually Useful?
Having data does not automatically mean that all of it is useful.
Suppose we want to predict house prices. House size is likely to be useful. The color of the owner's shoes probably is not.
We therefore need to think carefully about which information has a meaningful relationship with the problem we are trying to solve.
If we want to predict whether a customer will purchase a product, previous purchase behavior may be useful information. A randomly assigned customer ID usually has no meaningful relationship with purchasing behavior.
What If Important Information Is Missing?
This is a common real-world problem.
Imagine we want to predict house prices but our dataset does not contain the location of each house.
If location is an important factor in price, the model is missing potentially valuable information.
A more sophisticated algorithm cannot magically recover information that was never provided.
Better algorithms do not compensate for every missing or poor-quality input.
Input Data Has Different Forms
Machine Learning can work with many different kinds of information.
- Numbers — price, age, quantity.
- Categories — city, product type, customer type.
- Text — emails, reviews, documents.
- Images — photographs, scans, product images.
- Time-based information — dates, events, sensor measurements.
Later, we will see how these different forms of data are represented so that a model can work with them.
The Important Questions
When starting an ML problem, ask:
- What examples do we have?
- What information is available for each example?
- Which information could be useful?
- Is important information missing?
- Is the data reliable enough to learn from?
These questions help us understand the raw material that the Machine Learning system will work with.
Data Is the Starting Point of an ML Problem
Before choosing an algorithm or building a model, understand what examples and information you actually have. The quality and relevance of that information directly affect what the model can learn.
Identify the Features
Suppose we want to predict whether a customer will purchase a product.
We have:
- Number of previous purchases.
- Total amount spent.
- Number of pages viewed.
- Whether the customer added an item to the cart.
These pieces of information can be used as features because they describe the customer and may contain useful information for the prediction.