Feature Extraction in Machine Learning
A machine learning project should begin by asking what question it must answer and whether the available data can answer it.
Why Start With a Question, Not a Model
It is tempting to begin a machine learning project by choosing an algorithm and loading data into it. The source material argues for a different starting point: a machine learning project should begin by asking what question it must answer and whether the available data can answer it. These are early decisions, and they shape everything that follows, including which features you extract, how you judge the result, and how the finished solution fits into a larger system.
What do you think happens?
Suppose a team has a sharply worded business question, but the data they collected does not contain the information needed to answer it. Can a skilled choice of model or a clever phrasing rescue the project?
Reveal answer
No, a question the data cannot address will not become a good machine learning problem, however it is phrased.
Formulation depends on two things at once: a clear statement of the goal and an honest look at the data. Rephrasing cannot supply information that was never collected, and the model can only learn from the data it is given.
The Planning Checklist
Before any model is trained, a project needs answers to a set of planning questions. The source gathers them into six key questions. Together they cover the question you are trying to answer, the data you have, how the problem is phrased, the features you extract, how success is measured, and how the solution fits into a larger product.
- Question one: what are you trying to answer, and can the collected data answer it?
- Question two: how should that question be phrased as a machine learning problem?
- Question three: has enough data been collected to represent the problem?
- Question four: which features were extracted, and will they enable the right predictions?
- Question five: how will success be measured?
- Question six: how will the machine learning solution interact with other parts of the research or business product?
Treat these questions as a checklist that you work through in order. Each one exposes a different way a project can fail. A model can be technically sound and still answer the wrong question, or it can answer the right question using data that does not represent the situation. The diagram below shows the gate at the start of a project, where the first two questions decide whether work should move forward or loop back.
Phrasing a Practical Question as an ML Problem
The second question asks how the question should be phrased as a machine learning problem. A practical question such as whether a customer is likely to stop using a service is not yet a machine learning problem. To become one, it needs a defined set of inputs, meaning the information available to the model, and a defined target output, meaning the thing the model is meant to predict. Once both are stated, the problem has a shape that can be checked against the data.
Turning a business question into an ML problem
A subscription company asks: Which customers should our retention team contact this month?
- 1Clarify the goal
The team wants to reach customers who are at risk of leaving, so the goal is to find customers at risk. This is a clear statement of what must be answered.
- 2Check the data
Ask whether the collected records describe past customers and what happened to them. If there is no record of who left, the question cannot be answered from this data, and the project should loop back.
- 3Define the inputs
Choose the information the model will see for each customer, such as usage history or support contacts. These are the candidate features.
- 4Define the target output
State what the model predicts, for example whether a customer left within a given period, as a yes or no outcome.
The business question is now a machine learning problem: given each customer's inputs, predict the target outcome, then use those predictions to choose whom to contact.
Judging Whether the Data Represents the Problem
From Raw Records to Feature Columns
Feature extraction is the step where a raw record becomes the set of values a model actually sees. A raw record may contain fields in mixed forms, some useful for the goal and some not. Extraction selects and shapes the information into feature columns, and the judgment from the fourth question is whether those columns carry the signal the target output depends on.
Reading the diagram from left to right, the raw record is first narrowed to fields that relate to the goal, then each chosen field is turned into a value the model can use. The three feature columns on the right are the only information the model receives about each customer. If a field that matters to the goal was never extracted, no later step can recover it, which is why the feature question is asked before training.
Mistakes Beginners Make at the Start of a Project
Common mistake Training a model before stating what question it must answer
What it looks likeA team builds a model first and only later asks what it is for.
Why it failsWithout a clear goal, there is no basis for judging whether the data can answer anything or whether the result is useful.
Do this insteadWrite down the question and check the data against it before choosing an algorithm.
Common mistake Assuming a large dataset is enough
What it looks likeA team holds millions of records but they all come from one narrow situation.
Why it failsThe third question asks whether the data represents the problem, not whether it is large.
Do this insteadCompare what the data covers with what the problem requires and be honest about gaps.
Common mistake Extracting features because they are easy to obtain
Why it failsFeatures unrelated to the goal can make a project look busy without producing the predictions the problem needs.
Do this insteadCheck each feature against the predictions the problem requires.
Common mistake Choosing a success measure after seeing the results
Why it failsIf success is not defined in advance, a result is easy to judge by whatever looks favorable.
Do this insteadDefine the measure of success before the model is built.
Defining Success Before Training
The fifth question asks how success will be measured in your application. It belongs before the model is built, not after. The source asks you to determine the measure that fits your application rather than naming one measure for every project. The point is to fix the standard in advance so that the result is judged against a commitment made before anyone saw how the model performed.
How the Model Fits Into the Product
The sixth question asks how the machine learning solution will interact with other parts of the research or business product. A model rarely works alone. It receives inputs from one part of a system and its outputs are used by another part. The source asks you to consider this interaction early, because the needs of the surrounding product can shape the data, the features, and the way success is judged.
Reading the sequence from top to bottom, the user acts, the product gathers the inputs the model needs, the model returns a prediction, and the product shows the user a response. Each handoff is a place where the surrounding product sets requirements, such as which inputs are available at the moment the model runs. Those requirements feed back into the data and features chosen earlier.
Tracing a Project Through the Checklist
Walking one project through the six questions
A clinic wants a tool that flags appointment requests likely to be missed, so staff can send reminders. Work through the checklist in order and state what each answer changes.
- 1Question one
The goal is to identify requests likely to be missed. The clinic's booking records include whether each past appointment was attended, so the question can plausibly be answered from the data.
- 2Question two
Inputs are details of each request, such as lead time and past attendance. The target output is a yes or no outcome for whether the appointment is missed.
- 3Question three
The records cover only one clinic over one year. If the clinic plans to use the tool elsewhere, the data may not represent the wider problem. This gap should be stated before training.
- 4Question four
Lead time and past attendance are plausibly related to the outcome. A field that is easy to export but has no link to attendance should be left out.
- 5Question five
Before training, the team decides how success will be judged, for example by how well the flagged requests match the appointments that are actually missed.
- 6Question six
The flags must reach the reminder system in time to act. The product requirements therefore affect which inputs can be used when the model runs.
The checklist does not guarantee success, but it surfaces the representation gap and the timing requirement before any training begins.
Applying the Checklist to a New Project
A library wants to predict which book requests will be returned late. Using the six questions in order, write one sentence for each question describing what you would decide, and identify which question would most likely send the project back to the start.
Hints
- Start with the question: what must be answered, and does the loan history contain the outcome?
- For the representation question, consider whether the records cover all kinds of borrowers and all loan periods.
- For the success question, decide the measure before anyone looks at model results.
Key Takeaways
- A machine learning project should begin by asking what question it must answer and whether the available data can answer it; a question the data cannot address will not become a good problem, however it is phrased.
- Phrasing a practical question as a machine learning problem means stating its inputs and its target output, so that it can be checked against the data.
- Sufficiency means the data represents the problem, not that it is large; features must be judged on whether they enable the predictions the problem needs.
- Success should be defined in advance, and the solution should be considered in terms of how it will interact with the rest of the research or business product.