Types of Data

What Is Data?

Data is any information that can be collected and used to train a machine learning model. Not all data looks the same — some is organized in tables, some is text or images, and some is a mix.

Common Data Sources
  • Databases and spreadsheets
  • Images and videos
  • Audio recordings
  • Text documents and web pages
  • Sensor readings
  • Social media posts
  • Medical records
  • Financial transactions

Why Data Type Matters

The type of data you have determines what preprocessing steps are needed, which model architectures work best, and how you measure performance.

Data Type Affects Processing

Images — Require resizing, normalization, and special neural networks

Text — Requires tokenization and word embeddings

Tables — Require handling missing values and encoding categories

Audio — Requires conversion to spectrograms

Structured Data

Structured data is organized in rows and columns, like a table. It is easy to store, query, and use with most machine learning algorithms.

Structured Data Examples
  • Customer databases
  • Financial records
  • Student grade records
  • E-commerce order tables
  • Medical patient records
House Price Dataset

Features — House Size, Bedrooms, Location

Label — Price

Each row is one house. Each column is one feature. This clear structure makes it easy for algorithms to learn.

Unstructured Data

Unstructured data does not follow a fixed format. It requires special processing before most models can use it.

Unstructured Data Examples
  • Text articles and emails
  • Photos and videos
  • Audio recordings
  • Handwritten notes
  • Sensor streams

Text Data

What Models Learn from Text

Sentiment analysis — Positive or negative tone

Topic classification — What the text is about

Language translation — Converting between languages

Question answering — Responding to queries

Image Data

What Models Learn from Images

Object detection — Finding objects in an image

Facial recognition — Identifying people

Medical image analysis — Detecting diseases in scans

Autonomous vehicles — Understanding road scenes

Audio Data

What Models Learn from Audio

Speech recognition — Converting speech to text

Emotion detection — Identifying emotional tone

Speaker identification — Recognizing who is speaking

Music genre classification — Labeling music styles

Video Data

What Models Learn from Video

Action recognition — Identifying human activities

Surveillance analysis — Detecting unusual events

Content moderation — Filtering inappropriate content

Semi-Structured Data

Semi-structured data has some organization but does not fit neatly into rows and columns. It requires parsing before most models can use it.

Semi-Structured Examples
  • JSON files — Used in web APIs
  • XML files — Used in document exchange
  • Email files — Have headers and body sections
  • HTML pages — Mix of structure and text
JSON Example

name: "Alice"

age: 28

city: "Toronto"

This is structured within the object but different records may have different fields.

Structured vs Unstructured vs Semi-Structured

TypeFormatExamplesCommon Use
StructuredRows and columnsSpreadsheets, databasesClassification, regression
UnstructuredNo fixed formatText, images, audioNLP, computer vision
Semi-StructuredPartial formatJSON, XML, emailWeb APIs, document parsing

Numerical Data

Numerical data consists of numbers. There are two types.

Continuous

Can take any value in a range

  • Height: 172.4 cm
  • Temperature: 23.7°C
  • House price: $285,000
  • Distance: 14.2 km
Discrete

Only specific whole number values

  • Number of rooms: 3
  • Number of purchases: 12
  • Count of words: 150
  • Age in years: 28

Categorical Data

Categorical data consists of labels or groups. Most models require categorical data to be converted into numbers before training.

Categorical Examples

Blood type — A, B, AB, O

Color — Red, Blue, Green

Country — Canada, USA, Mexico

Product category — Electronics, Clothing, Food

Time-Series Data

Time-series data is recorded in sequence over time. Each data point is associated with a specific timestamp.

Daily Temperature Example

2026-06-01: 22°C

2026-06-02: 24°C

2026-06-03: 19°C

2026-06-04: 21°C

Time-series data helps models predict future values based on past patterns.

Time-Series Examples
  • Stock prices over months
  • Website traffic by hour
  • Patient heart rate over time
  • Energy usage over days
  • Sales trends over quarters

Common Data Formats

Data Formats

CSV — Comma-separated values, common for structured data

JSON — Flexible format for semi-structured data

XML — Used in documents and configurations

JPEG/PNG — Image formats

MP3/WAV — Audio formats

SQL databases — For structured relational data

Preprocessing by Data Type

Structured Data
  • Handle missing values
  • Normalize or scale numbers
  • Encode categorical features
Text Data
  • Tokenize into words or sentences
  • Remove stop words
  • Convert to numerical vectors
Image Data
  • Resize to standard dimensions
  • Normalize pixel values (0–1)
  • Apply data augmentation
Audio Data
  • Convert to spectrograms
  • Normalize amplitude
  • Resample to standard rate
Video Data
  • Extract frames
  • Resize images
  • Process audio separately

Data Type and Model Choice

Data TypeCommon Model Types
Structured (tabular)Decision Trees, Random Forests, Linear Regression
TextTransformers, RNN, LSTM
ImagesConvolutional Neural Networks (CNN)
AudioCNN on spectrograms, RNN
Time-seriesLSTM, ARIMA, Transformers

Real-World Example: Recommendation Systems

Multiple Data Types Combined

Structured — User purchase history tables

Text — Product reviews

Images — Product photos

Semi-structured — JSON user profiles

Real-World Example: Healthcare AI

Healthcare Data Types

Structured — Patient records and lab results

Images — X-rays and CT scans

Text — Doctor notes and reports

Audio — Heart and lung sounds

Challenges by Data Type

Common Challenges

Structured — Missing values, inconsistent formats, outliers

Text — Ambiguity, sarcasm, multiple languages

Images — Lighting variation, size differences, partial occlusion

Audio — Background noise, speaker variation, accents

Video — High computational cost, tracking across frames

Key Takeaways

Summary
  • Structured data is organized in rows and columns
  • Unstructured data has no fixed format
  • Semi-structured data has partial organization
  • Numerical data can be continuous or discrete
  • Categorical data represents labels or groups
  • Time-series data is recorded over time
  • Different data types require different preprocessing steps
  • Most real-world AI systems combine multiple data types

Need Help?

Ask the AI if you need help understanding structured, unstructured, or semi-structured data, numerical versus categorical data, or how to choose the right preprocessing steps for different data types.