What does it really take to turn messy, real-world data into something usable for AI—and why is simply collecting more data not always the answer?
When you think of “manipulating” data, do you picture devious schemes or careful, methodical preparation? In the world of artificial intelligence, preparing data is more like manicuring a garden—cultivating, shaping, and even pruning to reveal its true potential.
Manicuring the Data
Some people use the term manipulation when speaking about data, giving the impression that the data is somehow changed in an unscrupulous or devious manner. Perhaps a better term is manicuring, which makes the data well-shaped and lovely. No matter which term you use, however, raw data seldom meets the requirements for processing and analysis. To get something from the data, you must manicure it to meet specific needs. The following sections discuss data manicuring needs.
In many real-world projects, up to 80% of an AI professional’s time is spent preparing and cleaning data, rather than building the actual algorithms.
Dealing with missing data
To answer a given question correctly, you must have all the facts. You can guess the answer to a question without all the facts, but then the answer is just as likely to be wrong as correct. Often, someone who makes a decision, essentially answering a question, without all the facts is said to jump to a conclusion. When analyzing data, you have probably jumped to more conclusions than you think because of missing data. A data record, or one entry in a dataset (which is all the data), consists of fields that contain facts used to answer a question. Each field contains a single kind of data that addresses a single fact. If that field is empty, you don’t have the data you need to answer the question using that particular data record.
As part of the process of dealing with missing data, you must know that the data is missing. Identifying that your dataset is missing information can be quite difficult because it requires you to look at the data at a low level — something that most people are unprepared to do and that is time-consuming even if you do have the required skills. Often, your first clue that data is missing is the preposterous answers that your questions elicit from the algorithm and associated dataset. When the algorithm is the right one to use, the dataset must be at fault. Here are some issues to consider:
- Essential data missing: A problem can occur when the data collection process lacks all the data necessary to answer a particular question. Sometimes you’re better off to drop a fact than to use a considerably damaged fact.
- Some data missing: Less damaged fields can have data missing in one of two ways — randomly or sequentially:
- Randomly missing data is often the result of human or sensor error. Fixing randomly missing data is easiest. You can use a simple median or average value as a replacement. No, the dataset isn’t completely accurate, but it will likely work well enough to obtain a reasonable answer.
- Sequentially missing data occurs during some type of generalized failure. Fixing sequentially missing data is significantly harder, if not impossible, because you lack any surrounding data on which to base any sort of guess. If you can find the cause of the missing data, you can sometimes reconstruct it.
Think of a time when you had to make a decision without all the facts. How did your outcome compare to what you expected?
Considering data misalignments
Data might exist for each of the data records in a dataset, but it might not align with other data in other datasets you own. For example, the numeric data in a field in one dataset might be a floating-point type (with decimal point), but an integer type in another dataset. Before you can combine the two datasets, the fields must contain the same type of data.
All sorts of other kinds of misalignment can occur. For example, date fields are notorious for being formatted in various ways. To compare dates, the data formats must be the same. However, dates are also insidious in their propensity for looking the same but not being the same. For example, dates in one dataset might use Greenwich Mean Time (GMT) as a basis, whereas the dates in another dataset might use some other time zone. Before you can compare the times, you must align them to the same time zone. It can become even weirder when dates in one dataset come from a location that uses daylight saving time (DST) but dates from another location don’t.
Even when the data types and format are the same, other data misalignments can occur. For example, the fields in one dataset may not match the fields in the other dataset. In some cases, these differences are easy to correct. One dataset may treat first and last names as a single field, while another dataset might use separate fields for first and last names. The answer is to change all datasets to use a single field or to change them all to use separate fields for first and last names. Unfortunately, many misalignments in data content are harder to figure out. In fact, it’s entirely possible that you might be unable to figure them out. However, before you give up, consider these potential solutions to the problem:
- Calculate the missing data from other data you can access.
- Locate the missing data in another dataset.
- Combine datasets to create a whole that provides consistent fields.
- Collect additional data from various sources to fill in the missing data.
- Redefine your question so that you no longer need the missing data.
Practitioners often devote significant effort to reconciling date and time fields, especially in global organizations where datasets originate from different time zones and systems.
How might misaligned data types or formats impact the conclusions you draw from your analysis?
Want to go deeper? The science behind missing data strategies
Data scientists use statistical techniques like imputation to estimate missing values. For random missingness, using the mean, median, or mode can be acceptable—though it introduces some bias. For non-random missingness, advanced approaches like model-based prediction or even discarding problematic rows may be necessary. Choosing the right strategy depends on the pattern and importance of the missing data.
Separating useful data from other data
Some organizations’ leaders are of the opinion that they can never have too much data, but an excess of data becomes as much a problem as not enough. To solve problems efficiently, an AI requires just enough data. Defining the question that you want to answer concisely and clearly helps, as does using the correct algorithm (or algorithm ensemble). Of course, the major problems with having too much data are that finding the solution (after wading through all that extra data) takes longer, and sometimes you get confusing results because you can’t see the forest for the trees.
As part of creating the dataset you need for analysis, you make a copy of the original data rather than modify it. Always keep the original, raw data pure so that you can use it for other analysis later. In addition, creating the right data output for analysis can require a number of tries because you may find that the output doesn’t meet your needs. The point is to create a dataset that contains only the data needed for analysis, but keep in mind that the data may need specific kinds of pruning to ensure the desired output.
Practice identifying and removing unnecessary data from a sample dataset.
- Take a spreadsheet with at least ten columns of information.
- Define a clear question you want to answer using this data.
- Decide which columns are essential for answering your question.
- Create a new version of your dataset containing only those columns.
Why might it be risky to delete your original raw data during the pruning process?
In the healthcare industry, missing or misaligned patient data can lead to incorrect diagnoses or ineffective treatment plans, highlighting the importance of careful data preparation.
All the data collected for analysis, typically structured as records (rows) and fields (columns).
The process of replacing missing data with statistical estimates, such as mean, median, or predicted values.
More data always leads to better AI results.
Too much irrelevant data can actually slow down analysis and make it harder for AI to find meaningful patterns—focused, relevant data is best.
Sometimes you’re better off to drop a fact than to use a considerably damaged fact.
- Raw data must be carefully prepared before analysis
- Missing or misaligned data can lead to faulty conclusions
What is a “data record”?
Tap to revealOne entry in a dataset, typically containing several fields with facts about that entry.
What are the two main types of missing data described in this lesson?
Tap to revealRandomly missing data and sequentially missing data.
Why is it important to keep the original raw dataset unchanged?
Tap to revealSo you can reuse or re-analyze the raw data later if needed, without losing any information during pruning.
Which of the following is the best first step when you discover your AI model is producing unreasonable results?
Describe a scenario in your own studies or work where you had to “prune” a large amount of information to focus on what was truly relevant. How did you decide what to keep and what to discard?
Effective AI depends on careful data preparation—identifying, correcting, or removing missing and misaligned data, and focusing on only the information essential to your question.
Keeping your original, unmodified dataset intact is crucial, as it preserves the flexibility to revisit or correct your analyses in the future.
How confident are you that you can describe how to handle missing or misaligned data in an AI project?
The Shift
- Preparing data is an essential—and demanding—step in the AI process, often requiring as much skill as building the model itself.
- Missing, misaligned, or excessive data can distort AI results, so careful pruning and alignment are key.
- Always preserve the original raw dataset to allow for future analysis, correction, or new questions.