Lecture 3 - Data and Data Management II

Updated 14 Oct 2026

DES431 - Big Data Analytics and Machine Learning

Lecture 3: Data and Data Management II

Instructor: Asst. Prof. Dr. Apichon Witayangkurn (apichon@siit.tu.ac.th)


Roadmap

  • Data Storage
  • Data Security
  • Data Governance
  • Data Pipeline
  • Overview of Data Processing
  • Why Data Preprocessing
  • Data Quality
  • Tasks in Data Preprocessing
  • Validation, Verification

Data Storage

  • Data storage is the practice of recording and preserving data for the future.
  • Electronic storage is more common than paper document storage because of the increased volume of data. Companies might use magnetic tape, optical discs, or mechanical media to store data.

Think of data storage like a library that keeps growing — instead of shelving everything as physical books (paper), we digitize everything so it's faster to find, copy, and back up.

[Image: Storage pyramid diagram — Premium Storage (Flash) → Storage (Hard disk) → Archive Storage (Tape), with Hot data (fast access) at top and Cold data (slow access) at bottom, arranged by Capacity]


Hot, Warm, Cold: Data, Storage, Speed, Prices

  • Hot → High Performance (e.g., SSD, RAM) → Frequently Accessed → used for e-commerce, financial systems
  • Warm → Capacity Optimized (e.g., HDD) → Less Frequently Accessed → used for back office, general service
  • Cold → Long-Term Archive (e.g., Tape, Optical Disc) → Rarely Accessed → used for auto loader, off-line storage
  • Trade-off: Performance vs Cost — as performance increases, cost increases; as size/capacity increases, cost per unit decreases

Think of it like your closet: "hot" clothes are what you wear every day (easy to grab, but limited space), "cold" clothes are what you pack away in storage boxes (slow to get to, but cheap to store in bulk).


Disk (Storage)

HDDSSDNVMe
Read/write speedSlowAverageFast
Price per GbLowAverageExpensive
Max capacityHighHighAverage
S-ATA controller✅✅❌

[Image: Photos of HDD, SSD, and NVMe drives]

Sequential Speed Comparison (HDD vs SATA SSD vs PCIe 4.0 NVMe SSD)

  • HDD: ~150 MB/s read, ~130 MB/s write
  • SATA: ~550 MB/s read, ~550 MB/s write
  • PCIe 4.0 NVMe: ~7000 MB/s read, ~6500 MB/s write

[Image: Bar chart comparing sequential read/write speeds of HDD, SATA, and PCIe 4.0 NVMe]

Think of HDD as a bicycle, SSD as a car, and NVMe as a bullet train — same destination (storing/retrieving data), but wildly different speeds.


Share Storage

  • Multiple servers (Server 1, Server 2) can connect to the same Shared Storage pool.
  • OS disk: Virtual Drives integrate with physical disk arrays.
  • File Sharing: organizes data in a specific folder in fixed logical order — File Path, File Name, Date.

[Image: Diagram showing Server 1 and Server 2 both connected to Shared Storage; separate diagram showing OS disk virtual drives and file sharing folder structure]


Storage Area Network (SAN) and iSCSI

  • Block storage is accessed over the network as a Storage Area Network (SAN) using protocols such as iSCSI(Internet Small Computer System Interface).
  • iSCSI is protocol-based storage networking for linking data storage facilities.

[Image: iSCSI architecture diagram — disk array → LUNs → SPs (storage processors) → IP network → hosts with iSCSI initiators]

SAN with iSCSI is like a private highway connecting a warehouse (storage) to multiple factories (servers), where trucks (data) travel over standard internet-style roads (TCP/IP network).


Network Attached Storage (NAS) and NFS

  • File storage is accessed over the network as a Network Attached Storage (NAS) using protocols such as:
    • NFS (Network File System)
    • SMB (Server Message Block)
    • CIFS (Common Internet File System)
  • For file sharing, accessed by multiple hosts simultaneously.

[Image: NAS architecture diagram — Clients 1/2/3 connected via LAN to NAS Device A/B, each linked to their own Server and disks for File System A/B]

NAS is like a shared office file cabinet — anyone on the network (LAN) can open the same cabinet and grab files at the same time.


RAID Technology

  • RAID (Redundant Array of Independent Disks) is a data storage virtualization technology that combines multiple physical disk drive components into one or more logical units for the purposes of data redundancy, performance improvement, or both.

RAID Types

  • Stripe (RAID 0) — data split across disks (speed, no redundancy)
  • Mirror (RAID 1) — data duplicated across disks (redundancy)
  • RAID 5 — striping with parity (P1, P2, P3) for fault tolerance
  • RAID 10 (1+0) — combination of mirroring and striping

[Image: Diagrams of Raid 0 (Stripe), Raid 1 (Mirror), Raid 5, and Raid 10 disk layouts, plus a triangle showing trade-offs between FAST (RAID 0/RAID 1+0), CHEAP (RAID 5), and FAULT TOLERANT]

Think of RAID 0 as splitting a job between two workers to finish faster (but if one worker fails, the whole job fails). RAID 1 is like having a photocopy of every document (safe, but doubles the paper used). RAID 5 is a middle ground — some duplication (parity) without doubling everything.


RAID Connection

  • Hardware RAID — a customized processing system, using different controllers or RAID cards to manage the RAID design independently from the OS. (recommended)
  • Software RAID — uses the processing power of the computer's operating system in which the RAID disks are installed.

[Image: Comparison illustration of Software RAID (relies on CPU/IO/Memory of the computer) vs Hardware RAID (dedicated RAID chipset), plus photo of a RAID controller card]


Cloud Storage

  • Represents storage that is designed specifically for cloud-based provisioning.
  • Instances can be virtualized, spawning virtual server images.
  • Provides fixed-increment capacity allocation in support of the pay-per-use mechanism.
  • Exposed for remote access via cloud storage services.

Cloud Storage Types

  • Ephemeral → Instance Storage
  • Persistent → Block Storage, File Storage, Object Storage, Database, Queue Storage

[Image: Tree diagram — Cloud Storage branching into Ephemeral (Instance Storage) and Persistent (Block Storage, File Storage, Object Storage, Database, Queue Storage)]


Ephemeral vs Persistent Storage

  • Ephemeral Storage
    • The volatile temporary storage attached to your instances which is only present during the running lifetime of the instance.
    • Instance Storage (physically connected with hardware).
    • Fast read/write, cache, image processing.
  • Persistent Storage
    • The storage resource outlives any other resource and is always available, regardless of the state of a running instance.
    • Attached Storage — various types: OS disk, storage disk.

Ephemeral storage is like a whiteboard note during a meeting — useful while the meeting (instance) is running, but erased once it ends. Persistent storage is like a filing cabinet — it stays put whether or not anyone's currently in the office.


Object Storage

  • Operates at the application level, and the data is stored as objects.
  • Each object consists of an object identifier (OID), data, and meta-data.
  • Object storage is accessed with protocols such as HTTP using REST APIs.
  • Object metadata may include: Ownership, Created date, Size, Access pattern, Indexes, Retentions, QoS.
  • Common operations: GET /object/xxxx, PUT /object/xxxx, DELETE /object/xxxx

[Image: Diagram of an Object with ID, Meta Data, Data, and Attributes branches; Azure Blob Storage and Amazon S3/Glacier logos]

Object Storage — Benefits

  • Greater data analytics — driven by metadata, so classification for every piece of data enables far greater analysis opportunity.
  • Infinite scalability — keep adding data, forever; there's no limit.
  • Faster data retrieval — due to categorization structure (no folder hierarchy), data retrieval is much faster.
  • Reduction in cost — scale-out nature makes it less costly to store all your data.
  • Optimization of resources — no filing hierarchy and fully customizable metadata means far fewer limitations than file or block storage.

Object storage is like a warehouse that labels every box with a barcode (metadata) instead of putting boxes into specific numbered shelves (folder hierarchy) — you can find any box instantly by scanning for its label, no matter how big the warehouse gets.


Object Storage: Access (AWS)

  • Object storage is accessed with protocols such as HTTP using REST APIs.
  • Example structure: https://my-bucket.s3.amazonaws.com/2006-03-01/pup.jpg
    • Bucket: my-bucket
    • Prefix: 2006-03-01
    • Object key: pup.jpg

[Image: Amazon S3 diagram showing Bucket, Bucket with objects, and Object, with URL breakdown into Bucket/Prefix/Object key]


Object Storage: AWS S3

S3 Use cases — Use Amazon S3 when you have:

  • Large number of users that access your content
  • Growing data sets
  • Data that you will write once and read many times

Common use cases:

  • Backup and restore
  • Data lakes for analytics
  • Media storage and streaming
  • Static website
  • Archiving and compliance

[Image: Icons representing Backup and restore, Data lakes for analytics, Media storage and streaming, Static website, Archiving and compliance]


Data Security

  • The process of safeguarding digital information throughout its entire life cycle to protect it from corruption, theft, or unauthorized access.
  • It covers everything — hardware, software, storage devices, and user devices; access and administrative controls; and organizations' policies and procedures.

Components:

  • Firewall
  • Authentication / Authorization
  • Encryption
  • Data Masking
  • Hardware-based Security
  • Data backup
  • Data erasure

[Image: Row of icons representing Firewall, Authentication Authorization, Encryption, Data Masking, Hardware-based Security, Data backup, Data erasure]


Data Security - Masking

  • Data masking hides sensitive information (like SSN, InsuranceNo, BankAccountNo) depending on the user's access level and login context:
    • Admin: No masking rule applied — original data is displayed.
    • Normal user (business hours login): Masking rule applied on SSN only — XXX-XXX-XXX is displayed instead of original SSN data.
    • Normal user (out-of-business-hours login): Masking rule applied on SSN, InsuranceNo, and BankAccountNo — XXX is displayed instead of original data.

[Image: Table showing employee data (Name, Employee ID, SSN, InsuranceNo, BankAccountNo) in three views — Admin (fully visible), Business hour login (SSN masked), Out of business hour login (all sensitive fields masked)]

Source: https://research.aimultiple.com/data-masking/

Think of it like a museum: the curator (admin) can see and touch everything, daytime visitors (normal users during business hours) can see most exhibits but not the vault, and after-hours visitors get even less access.

De-identification Process (Production → Test Database)

  • Shuffling — reordering data values
  • Substitution — replacing real values with fake but realistic ones
  • Custom Algorithm — customized transformation logic
  • Masking — hiding part of the value (e.g., credit card XXXX XXXX XXXX 0062)
  • Nulling — removing the value entirely (e.g., Patient Records → ###)
  • Encryption/Decryption — scrambling data reversibly (e.g., SSN → @#% $- &$#!)

[Image: Diagram showing Production Database with real personal information being de-identified via Shuffling/Substitution/Custom Algorithm/Masking/Nulling/Encryption into a Test Database with fake data]

Source: https://research.aimultiple.com/data-masking/


Data Security - Backup

Type of DataBackup FrequencyOnsite RetentionOffsite RetentionDestroy AfterComment
Server Operating SystemsDaily and before patching or major upgrades7 days7 daysN/ABaseline backup policy for all servers.
Employee RecordsDaily35 days7 days7 yearsPer legal and regulatory compliance, employee records are kept in a database with closed access. Records older than 7 years are purged each month.
ERP System DatabaseEvery 8 hours and before patching or major upgrades28 days7 daysN/ABusiness requirement. Any data lost between backups can be reconstituted through paper-based records.
Employee home directoriesDaily7 daysN/A90 days after terminationPer HR policy, daily backups of employee directories held onsite for 7 days. No offsite requirement exists. Records are destroyed 90 days after employee's last day of work.

Source: https://www.inap.com/blog/backup-policy/


Data Governance

  • Data governance is everything you do to ensure data is secure, private, accurate, available, and usable. It includes the actions people must take, the processes they must follow, and the technology that supports them throughout the data life cycle.

Core cycle: People → Process → Technology → Data Governance

Surrounding areas:

  • Information Lifecycle Governance
  • Data Privacy
  • Data Stewardship
  • Data Quality
  • Metadata Management
  • Master & Reference Data Management
  • Data Security Management

[Image: Circular diagram with "Data Governance" at center (People/Process/Technology arrows) surrounded by Information Lifecycle Governance, Data Privacy, Data Stewardship, Data Quality, Metadata Management, Master & Reference Data Management, Data Security Management]

Data governance is like running a country — you need laws (policy & standard), enforcement (compliance & audit), officials (stewardship), and public education (awareness) to keep everything functioning smoothly.

Data Governance Framework (GBDi)

Top-level functions:

  • Organization & Stewardship — DG Committee, Steward team, Data Controller/Processor/User
  • Policy & Standard — Data Management, Data Quality Assurance, Data Exchange
  • Data Risk Management, Compliance & Data Audit — Data Risk Management, Data Law & Regulation, Data Quality Audit
  • Building Knowledge & Awareness — Program Coverage, Measurement, Ongoing

Foundation (bottom layer):

  • Data Catalog — What data? Who's the owner? Search Tags, Data sources
  • Data Security & Privacy — Confidentiality, Integrity, Availability
  • Data Quality — Accuracy, Validity, Timeliness, Completeness, Uniqueness, Consistency

[Image: GBDi Data Governance framework diagram showing top-level functions flowing down into a Foundation layer of Data Catalog, Data Security & Privacy, and Data Quality]

Data Governance - Data Flow Example

  • Internal Data (from multiple internal databases) + External Data → combined via Data Catalog → Data Warehouse
  • Data Warehouse ↔ Data Lake (sources: Mobile, Web-Logs, Social Media, Google Trends, Telematics, Location Data — processed via Hadoop/Spark)
  • Both feed into Data Service (Internal and External Users) using tools like Tableau, Python, Power BI, RapidMiner

[Image: Diagram showing internal databases and external data flowing into a Data Warehouse via Data Catalog, alongside a Data Lake fed by IoT/mobile/web/social data sources processed with Hadoop and Spark, all serving Data Service tools like Tableau, Python, Power BI, RapidMiner]


Data Pipeline

  • A data pipeline is a means of moving data from one place (the source) to a destination (such as a data warehouse). Along the way, data is transformed and optimized, arriving in a state that can be analyzed and used to develop business insights.

Flow: Source 1/2/3 → Extract (Raw data) → Staging area (Transform) → Load (Prepared data) → Data warehouse → Analyze → Output/Report

[Image: Diagram showing Source 1/2/3 → Extract → Staging area (Transform) → Load → Data warehouse → Analyze → chart/report icon]

A data pipeline is like a water treatment system: raw water (source data) flows in, gets filtered and purified (transform) at the treatment plant (staging area), and clean water (prepared data) is delivered to homes (data warehouse) ready for use (analysis).

Data Pipeline: Components

  • Source — where data originates (IoT devices, relational database (RDB), file server (ftp/sftp), cloud storage from AWS, Azure)
  • Destination — end point of the pipeline where extracted data is kept for further analysis
  • Dataflow — the flow or movement of data from source to destination
  • Processing — intermediate activities or steps
  • Storage — where data is kept at different steps
  • Workflow — the sequence of processes and their dependencies
  • Monitoring — checks that the pipeline is working properly

Data Pipeline: Example

Data Source → Data Pipeline → Data Usage

  • Data Source: IOT Device/GPS Probe Data/LORA, File Server (FTP/SFTP), Database Server (SQL/PostgreSQL), Cloud Server (AWS/Azure), Logs
  • Data Pipeline:
    • Data Ingestion → Data Warehouse
    • Data Wrangling (Data Discovering → Data Transformation → Data Structuring → Data Filtering → Data Enriching → Data Validating) → Data Publishing
  • Data Usage: Data Analytics/Business Intelligence, Data Visualization, Transfer Data to other Systems or Downstream projects

[Image: Detailed flowchart of Data Source icons → Data Ingestion → Data Warehouse → Data Wrangling steps (Discovering, Transformation, Structuring, Filtering, Enriching, Validating) → Data Publishing → Data Usage icons]

Data Pipeline: Apache NiFi (Example Task)

  • Task: Get data from multiple sources and put data to the destination.
  • Example flow: Multiple GenerateFlowFile processors → connected to a Funnel → connected to a PutFileprocessor.

[Image: Screenshot of Apache NiFi interface showing GenerateFlowFile 1/2/3 processors connecting through a funnel into a PutFile processor]

Data Pipeline — Key Considerations

  • Data pipeline scheduling — When do we run the pipeline (Hourly, Daily, Weekly, Monthly etc.)?
  • Data pipeline failure — How to deal with it when any process within the data pipeline fails?
  • Data source not available or data arriving late — What to do when source data is not available or is arriving late?
  • Data source schema change — What if the data source schema is altered?
  • Data security — How to make sure data transfer and transformation is done securely?
  • Data queue — How to efficiently queue the data and minimize latency?

Overview of Data Processing

Data Processing Cycle

  • Systematic stages through which raw data is transformed into meaningful insights.
  • The data is processed again and again until the accurate result is achieved.
  • It is a very important activity and involves very careful planning.
  • Usually involves four basic activities: Input → Preprocessing → Processing → Output, with Feedback & Iteration looping back.
  • May include data collection, storage, analysis, and visualization.

[Image: Circular flow diagram — 1. Input → 2. Preprocessing → 3. Processing → 4. Output → back to Input, labeled "Feedback & Iteration"]


Data Processing Cycle: Step 1 — Input (Data Collection)

  • The process through which collected data is transformed into a form that a computer can understand. It is very important since correct output totally depends on the input data.
  • From various sources (high volume, velocity, and variety): IoT, social media, transactional systems, sensors, logs.
  • Verification: The collected data is verified to determine whether it is correct as required (e.g., collected data of all students at a university is verified). If errors occur, data is corrected or collected again.
  • Coding: The verified data is coded or converted into machine-readable form so it can be processed by a computer.
  • Storing: Structured (DB), Unstructured/Semi-structured (NoSQL, S3, HDFS). The stored data on the storage media is given to the program as input for processing (considering scalability, fault tolerance, access speed).

Data Processing Cycle: Step 2 — Preprocessing

  • Understand data with statistics and prepare for analysis by improving its quality and structure.
  • Removes or corrects inaccurate, incomplete, or irrelevant data.
  • Converts data into a suitable format or structure for analysis.
  • Ensures data meets quality standards and is ready for analysis.

Sub-steps (cyclical):

  1. Data profiling
  2. Data cleansing
  3. Data reduction
  4. Data transformation
  5. Data enrichment
  6. Data validation

[Image: Circular 6-step diagram — Data profiling → Data cleansing → Data reduction → Data transformation → Data enrichment → Data validation, looping back]


Data Processing Cycle: Step 3 — Processing (includes Data Analysis)

  • The term "processing" denotes the actual data manipulation techniques such as classifying, sorting, calculating, summarizing, comparing, etc. that convert data into information or insight.

Exploratory analysis — Understand structure, distribution, and relationships in the data:

  • Summary statistics (mean, median, mode, etc.)
  • Correlation analysis
  • Data visualization (histograms, scatter plots, box plots)

Statistical Analysis — Identify trends, test hypotheses, quantify relationships:

  • Regression analysis
  • Hypothesis testing (t-tests, chi-square tests)
  • Time series analysis

Classification — Data is classified into different groups and subgroups so each group/subgroup can be handled separately.

Machine Learning & Predictive Modeling — Build models to predict future outcomes and detect unusual behavior or hidden patterns:

  • Supervised learning (e.g., linear regression, decision trees, random forests)
  • Unsupervised learning (e.g., clustering, PCA)
  • Deep learning (e.g., neural networks for image/text data)

Summarizing — Data is processed to represent it in a summarized form for reporting, e.g., a summary prepared for top management.


EX: Significant Places with Location Labeling

  • Mining sparse GPS data to extract daily significant places.
  • Main algorithm: Spatial clustering and Random Forest Classification.

Steps:

  1. Extract individual daily stay points — Average 4-8 stay points / day / person.
  2. Spatial clustering (Density-based Cluster) — 2-15 clusters / person / year.
  3. Classification Features & Random Forest:
    • Rank in cluster
    • No. of stay point (%)
    • Time threshold
    • Duration of stay
    • Night time, Day time (%)
    • No. of day (%)
    • Hour Periods (%)
    • Low Active Periods (%)
    • → classifies clusters as Home or Work

[Image: Three-part diagram — 1) GPS trajectory with stay points detected on a map (Day 1), 2) Spatial clustering across multiple days (Day 1-365) showing clusters forming, 3) Decision tree diagram (Random Forest) classifying clusters into Home vs Work]

[Image: Map of Tokyo showing GPS stay points (small dots) and stay clusters (larger green circles), with call-out bubbles labeled "Home?" and "Work Place?" pointing to frequently visited clusters]

This is like figuring out where someone lives and works just by watching where their phone "hangs out" the most — cluster where they stay overnight = home, cluster where they stay during work hours on weekdays = work.


Data Processing Cycle: Step 4 — Output

  • After completing the processing step, output is generated. The main purpose of data processing is to get the required result. Mostly, the output is stored on storage media for later use.
  • Retrieval: Output stored on the storage media can be retrieved at any time (e.g., result of students is prepared and stored on disk, retrievable when required for different purposes — DB, JSON, Parquet, NoSQL).
  • Visualization: Visual formats that are easier to understand, interpret, and communicate insights effectively.
  • Communication: The generated output is sent to different places (e.g., a weather forecast is prepared and sent to different agencies and newspapers where it is required).

[Image: Icons representing FTP/CSV storage, database storage, and various map visualizations]


Data Processing Cycle: Repeat or Iterate

  • In the real world, there are many steps — your output can become the input of the next step.

[Image: Chain of multiple Input → Processing → Output cycles, each feeding into the next, illustrating iterative processing; alongside example charts showing "Number of Unique ID: DATA (Daily)" and "Point Max of UID (Daily)" with incomplete/noisy data, plus a frustrated cartoon face]


Why Data Preprocessing?

Data in the real world is dirty

  • Incomplete: lacking attribute values, lacking certain attributes of interest, or containing only aggregate data.
    • e.g., Occupation = " " (missing data)
  • Noisy: containing errors or outliers.
    • e.g., Salary = "−10" (an error)
  • Inconsistent: containing discrepancies in codes or names.
    • e.g., Age = "42", Birthday = "03/07/2010"
    • e.g., rating was "1, 2, 3", now rating is "A, B, C"
    • e.g., discrepancy between duplicate records

Real-world data is like a messy handwritten survey form — some fields are left blank (incomplete), some answers don't make sense like "age: -10" (noisy), and some people wrote "yes/no" while others wrote "Y/N" for the same question (inconsistent).

Real Examples of Dirty Data

  • Example 1: A chart of "Number of Unique ID: DATA (Daily)" shows a large unexplained dip to zero for about a month — indicating missing/incomplete data collection during that period.

[Image: Line chart "Number of Unique ID: DATA (Daily)" showing Unique IMSI and Unique IMEI counts with a dip to zero mid-year]

[Image: Line chart "Point Max of UID (Daily)" showing highly erratic spikes for Max, Max Err1, Max Err2, Max Err3 series starting around 2011]

  • Example 2: IMEI field showing only 1 unique value across many records (faa5ec61130c3622e7aac7b5dfdf743e11314e7c597c8363054949059b23feec) — suggests IMEI may have been swapped with ACCESS_METHOD_IDENTIFIER, or IMSI should be used instead.
Date OnlyTotal CallsUnique IMSIUnique IMEITotal Data
2015-06-013,348,588219,67013,348,588
2015-06-023,387,859221,43913,387,859
2015-06-033,524,157224,14613,524,157
2015-06-043,552,568221,72313,552,568
  • Example 3: Data requested from a provider via a template came back in inconsistent formats — e.g., CSV with headers like DATESTARTOFCHARGING, RECORDTYPE, FIRSTCGI, A_MSISDN, ..., versus pipe-delimited (|) records like 3MSI1HD_0501.txt.out:20140430233946|MTCI219398caf5c958c1|..., versus another CSV with completely different columns (CallType, Calling Number, Calling IMSI, Latitude, Longitude, ...) — showing how the same requested data can come back structured very differently from different sources.

  • Example 4: Duplicate data and filtering by study area:

    • Rows with identical IMEI, lat/lon, speed, direction, etc. but different IDs and timestamps one second apart — likely duplicates or stationary device noise.
    • After filtering data to a study area (e.g., a map region), the dataset shrinks significantly.
ItemData amount (rows)
Original data255,696,504
Data after filtering219,425,243
Removed record36,271,261

[Image: Map of a city with GPS trajectory lines densely covering the area, with a red rectangle marking the filtered "study area"]


Why is Data Dirty?

  • Incomplete data may come from:
    • "Not applicable" data value when collected
    • Different considerations between the time when the data was collected and when it is analyzed
    • Human/hardware/software problems
  • Noisy data (incorrect values) may come from:
    • Faulty data collection instruments
    • Human or computer error at data entry
    • Errors in data transmission
  • Inconsistent data may come from:
    • Different data sources
    • Functional dependency violation (e.g., modifying some linked data but not others)

Error Sources

  • Data Acquisition — Device/instrument errors, data entry errors, image interpretation error.
  • Data Conversion — Instrument inaccuracies, device/instrument operator error.
  • Data Storage — Digital representation limits, disk storage limits.
  • Data Processing — Rounding off error, error propagation law (decimal digit); information derived by mathematical operations is no more accurate than the original information.

Data Quality: Why Preprocess the Data?

Measures for data quality — a multidimensional view:

  • Accuracy: correct or wrong, accurate or not.
  • Completeness: not recorded, unavailable, …
  • Consistency: some modified but some not, …
  • Timeliness: timely update?
  • Believability: how trustable is the data — is it correct?
  • Interpretability: how easily can the data be understood?

[Image: Map of Bangkok showing traffic/route data as example context; small charts of "Number of Unique ID: DATA (Daily)" with min/max/avg statistics table]

"Look ok?" — Hidden Data Quality Issues Example 1 (Titanic-style dataset)

A passenger dataset that looks fine at first glance but has subtle issues:

  • Sex column has inconsistent values: Female, Male, F, Male (typo?), M — mixing full words and abbreviations.
  • Age column has missing values for some passengers (e.g., "Omont, Mr. Alfred Fernand" and "Parr, Mr. William Henry Marsh" have blank age).
Passenger ClassNameSexAge...
FirstNewsom, Miss. Helen MonypenyFemale19...
FirstOliva y Ocana, Dona. FerminaF39...
FirstOmont, Mr. Alfred FernandMale(blank)...
FirstOvies y Rodriguez, Mr. ServandoM28.5...
FirstParr, Mr. William Henry MarshM(blank)...

This is a classic example of inconsistency (Female vs F vs Male vs M for the same "Sex" field) combined with incompleteness (missing ages) — the kind of thing that looks fine until you actually check each cell carefully.

"Look ok?" — Hidden Data Quality Issues Example 2 (Weather dataset)

  • A weather dataset (year, month, day, T, Tmax, Tmin, Pr, P, e, VPD, RH, RHmin, u) has a Pr (precipitation, mm) column filled entirely with -99999 — a classic sentinel/placeholder value for missing data that could be mistaken for a real value if not checked carefully.
yearmonthdayT(C)Tmax(C)Tmin(C)Pr(mm)P(hPa)e(hPa)VPD(hPa)RH(%)RHmin(%)u(m/s)
197611-7.7-1-13-999991003.32.21.2264.2440.44
197612-4.43-13-99999994.63.11.3170.3492.62
197613-3.12-11-999991010.72.91.9659.6392.27

-99999 is a common trick data providers use to mean "no data here" instead of leaving it blank — like writing "N/A" but as a number. If you don't know this convention, you might accidentally include -99999 in your average rainfall calculation and get a wildly wrong result!


Principle Tasks in Data Preprocessing

  • Data Validation — Validation ensures the validity of input data as expected.
  • Data Verification — Verification is the process of checking the typed data against some other 'business' rules.
  • Data Cleaning — Fill in missing values, smooth noisy data, identify or remove outliers, and resolve inconsistencies.
  • Data filtering/sorting
    • Filter or select only interested data.
    • Sort or order data by some key or criteria.

Principle Tasks in Data Preprocessing (2)

  • Data Integration — Combine, merge, integrate multiple files, databases, datasets.
  • Data Transformation — Normalization and aggregation.
  • Data Reduction — Obtains reduced representation in volume but produces the same or similar analytical results.
  • Data Discretization and Concept Hierarchy Generation — Part of data reduction but with particular importance, especially for numerical data.

Data Validation (in data processing)

A process to automatically check data, ensuring input is as expected and sensible for the computer. Typical checks are as follows:

  • Presence Check — Checks that data exists and is complete. E.g., data file must have 8 columns.
  • Type Check — Check that an input value is of a particular type. E.g., age is numeric.
  • Length Check — E.g., address data must not be longer than 100 characters.
  • Range Check — Data must be in a particular range, such as month value [1-12].
  • Format Check — E.g., date value must be in "DD-MM-YYYY" format; email must match XX@YY.ZZ.

Think of data validation as a bouncer at a club checking your ID at the door — is it present, is it the right type of document, is it the right length, does the date fall within a valid range, and is it formatted correctly? It doesn't check if you're a good person (that's verification), just whether your ID looks legit on the surface.


Data Verification (in data processing)

  • Verification is the process of checking the typed data against some other 'business' rules.
  • Verify email address is correct by sending an email and waiting for a response.
  • It is a process wherein different types of data are checked for accuracy or existence.
    • Check if User ID exists in the system.
    • Verify Product ID and data.
    • Check credit card information and verify purchase.

If validation is checking that an ID looks correctly formatted, verification is calling the ID issuer to confirm the ID is actually real and belongs to you — e.g., sending a confirmation email and waiting for the click, or checking a credit card against the bank before approving a purchase.


Summary

  • Data Storage
  • Data Security
  • Data Governance
  • Data Pipeline
  • Overview of Data Processing
  • Why Data Preprocessing
  • Data Quality
  • Tasks in Data Preprocessing
  • Validation, Verification

[Image: Closing slide with windmill photograph and text "To be continued."]