Based on the AIF-C01 exam guideReport an error
The most basic way to categorize data is whether it has a fixed structure.
| Category | Structured data | Unstructured data |
|---|---|---|
| Structure | Organized in rows and columns (tabular) | No fixed table structure |
| Examples | Excel sheets, database tables, CSV | Images, audio, video, free text |
| Handling | Relatively easy (already numbers/categories) | Hard (must be converted to numbers) |
| Share | A portion of all data | Most of the world's data |
There is also semi-structured data. JSON, XML, and log files are not full tables, but they carry some structure such as tags and keys. For the exam it is enough to know the two extremes, "structured vs unstructured," and that semi-structured sits in between.
A bank's transaction history (date, amount, account number) is classic structured data. A call-center recording or a free-form complaint written by a customer is unstructured data. Extracting meaning from unstructured data is exactly where deep learning and generative AI shine.
You don't use all the data you collect for training. In a word, it is "to take a fair exam."
| Dataset | Role | Analogy |
|---|---|---|
| Training | Used by the model to learn patterns | Studying from the textbook |
| Validation | Used mid-training to tune and check settings | Checking with a practice test |
| Test | Used once to measure final performance | The real exam |
The difference between validation and test is easy to confuse. Validation data is used during training to ask "is this setting good?" and to tune the model (the practice test). Test data is used only once, after all tuning is finished, to measure final ability (the real exam). Typical split ratios are about 60-80% training, 10-20% validation, and 10-20% test (there is no fixed right answer).
When test data gets mixed into training data, it is called data leakage. The evaluation score then comes out unrealistically high, and you end up with a model that performs poorly in actual operation. Keeping the three sets cleanly separated is the first condition of fair evaluation.
"Garbage In, Garbage Out" - no matter how sophisticated the algorithm, you can't build a good model from bad data.
| Quality dimension | Meaning | What happens when it's poor |
|---|---|---|
| Accuracy | Do the values match reality? | Typos and errors get learned, producing wrong patterns |
| Completeness | Are there missing values? | Many blanks distort patterns |
| Consistency | Are formats and units uniform? | Mixing "kg" and "g" causes confusion |
| Timeliness | Is the data up to date? | Stale data drifts from reality |
| Representativeness | Does it reflect reality evenly? | A biased model results |
Data bias is a core topic in Responsible AI. A model's bias mostly comes from its data. If the data is skewed to one side, the model's judgments are skewed too. So "collecting diverse and representative data" is not just a performance issue; it is also a fairness and ethics issue.
🎯 Scenario: "We built a model to evaluate job applications, but trained it on data where past hires were mostly one gender. What problem arises?" → The data lacks representativeness and fairness, so the model learns and reproduces past bias as-is. This is a textbook failure of data quality (especially representativeness).
⚠️ Pitfall: With such imbalanced data, plain accuracy is almost meaningless. A model that answers "all normal" gets 99.9% accuracy but catches none of the fraud it was supposed to catch. That is why metrics beyond accuracy (precision and recall) are needed, which we cover tomorrow in Day 3.
Suppose a model answers "all normal" on a dataset with 10 fraud cases (0.1%) out of 10,000 transactions.
| Item | Calculation | Value |
|---|---|---|
| Correct count | 9,990 normal cases called normal | 9,990 |
| Accuracy | 9,990 ÷ 10,000 | 99.9% |
| Fraud caught | 0 of 10 | 0% |
Besides structured/unstructured, the exam guide names data along several other axes. Because the axes differ, one dataset can carry several names.
| Type | What it looks like | Example | What to know |
|---|---|---|---|
| Labeled | Each input comes with an answer | Reviews marked "positive/negative" | Needed for supervised learning. Creating it takes human effort |
| Unlabeled | Inputs only | Raw review text piled up | Easy to obtain. Used for unsupervised learning |
| Tabular | Row = one record, column = one feature | Customer table | The typical structured data |
| Time-series | Values recorded in time order | Daily sales, sensor temperature | The order itself is information |
| Image | A grid of pixels | Product photos, X-rays | Unstructured. Mostly handled with deep learning |
| Text | A sequence of characters | Inquiries, contracts | Unstructured. The subject of natural language processing |
⚠️ Pitfall: Time-series data must not be split by random shuffling. If you shuffle, you can end up training on March data and testing on February data, so the model is evaluated as if it had "seen the future." Keep time order, train on the past and test on the most recent period, so the setup matches real usage.
Leakage isn't only "test data was accidentally put into training." What they all share is one thing - information that can't be known in production flowed into training.
| Type | What happens | Example |
|---|---|---|
| Test data mixed in | Evaluation data goes straight into training | Trained on the entire dataset before splitting |
| Duplicates | The same record exists in both training and test | One customer's same order record stored twice and split across both |
| Features that reveal the answer | The input contains a value that only exists after the outcome | Predicting "refund or not" while a feature holds "refund processed date" |
| Symptom | Quality dimension to suspect | What to fix |
|---|---|---|
| Predictions are badly wrong only for certain regions or age groups | Representativeness | Collect more data for that group |
| Weight predictions are off by 1,000x for some records | Consistency | Unify units and formats, such as kg and g |
| A model that was accurate last year is off this year | Timeliness | Retrain on recent data |
| The age column is about half empty | Completeness | Fill in blanks or exclude those records |
| The same photo is tagged both "dog" and "cat" | Accuracy (label error) | Re-audit the labels |
| It catches none of the rare cases | Balance | Reinforce the rare class and change the metric |
Tomorrow we look at how to measure how well a model built from this prepared data performs: accuracy, precision, recall, and overfitting and underfitting.
Click a choice to reveal the answer and explanation.
Question 1
Which of the following is unstructured data?
Question 2
What is the most fundamental reason to split data into training, validation, and test sets?
Question 3
What is it called when data set aside for testing gets mixed into the training data, producing unrealistically high evaluation scores?
Question 4
A face recognition model was trained only on photos of one ethnicity and then recognized faces of other ethnicities poorly. Which aspect of data quality was lacking?
Question 5
When evaluating a fraud detection model on data that is 99.9% normal transactions and 0.1% fraudulent transactions, what is the best reason not to rely on plain accuracy alone?