Lecture 1 - Introduction
DES431 - Big Data Analytics and Machine Learning
Lecture 1: Introduction
- Instructor: Dr. Apichon Witayangkurn (apichon@siit.tu.ac.th)

Objectives of the Class
- This course aims to provide a basic introduction to big data, its use cases, corresponding technology, and tools
- Topics include big data concepts, preprocessing techniques, computation framework, data analysis techniques, and visualization tools
- The student will learn state-of-the-art solutions for managing and analyzing large-scale datasets
- Includes practical exercises and tutorials to familiarize students with the format of big data
- Students will apply what they learn in one analytic project
Learning Outcomes
- Understand the concept of big data and its related concepts
- Understand the techniques for preprocessing data and use the tool
- Manage and handle big data using the Hadoop ecosystem
- Evaluate data analysis problems to determine how Big Data algorithms, programming models, and techniques can be applied
- Develop big data analysis solutions using the Hadoop ecosystem
- Able to use visualization tools supporting visualization of the analytic result
- Able to use cloud services for big data analysis
What are in the Class?
- Main Lectures
- 14 lectures (3-hours each + 15 min break)
- No Live stream, but on-demand on SIIT Lecture system
- Homework Assignments
- In-class tutorial
- Group Project
- 2 presentations
- 6 members/group (tentative)
- Midterm Exam
- Final Exam
Course Schedule: Big Data Analytics
- Instructor: Dr. Apichon Witayangkurn
- Course website: BKD 1101
Grading
| Assessment Method | % Marks |
|---|---|
| Class Attendance (random check) | 5% |
| Homework Assignment and In-class Tutorial | 20% |
| Project | 30% |
| Midterm Exam | 20% |
| Final Exam | 25% |
| Total | 100% |
Remarks:
- Check course schedule (date and time)
- Attend lecture
- Work on assignments
- Don't forget exam date!
Textbook (Optional)
- Hadoop: The Definitive Guide, 4th edition, Tom White — O'REILLY (2015), ISBN: 978-1-491-90163-2
- Hadoop in Action, Chuck Lam — MANNING (2010), ISBN: 978-1-935-18219-1
- Mastering Apache Spark, Mike Frampton — Packt Publishing (2015), ISBN: 978-1-78398-714-6
- Big Data Visualization — Packt Publishing (2017), ISBN: 978-1-78528-194-5
What You Will Practice in the Class
- Big Data Platform
- HDFS
- MapReduce
- HIVE
- SPARK
- Ambari
- Big Data on cloud
- Amazon EMR
- Data Processing Tool
- Rapid Miner (AI Studio)
- Visualization Tool
- Tableau
- Programming Language
- Java
- Python
Data Analysis Tool: Altair RapidMiner (Altair AI Studio)
Related
- RapidMiner is a software platform developed by the company of the same name that provides an integrated environment for machine learning, data mining, text mining, predictive analytics and business analytics
- Used for business and industrial applications as well as research, education, training, rapid prototyping, and application development
- Supports all steps of the data mining process including results visualization, validation and optimization
- Link: https://rapidminer.com/
- Use version 2026.1.1

Install RapidMiner Studio -- Data Science Tool
- Sign up at: https://my.rapidminer.com/nexus/account/index.html#signup (Free for 1 year, renewable)


Tableau – Visualization Tool
- Free academic license: https://www.tableau.com/academic/students (Free for 1 year, renewable)
- Offers free one-year Tableau licenses to students at accredited academic institutions through the Tableau for Students program


Apache Hadoop - Ambari Hadoop Management

Free Resources: AWS Academy
- Wait for invitation from course instructor

Today Topics
- What is Big Data
- Characteristics of Big Data
- Challenges in Big Data Analytics
- Related Terminology
- How to deal with Big Data
- Hadoop Platform and its Ecosystem


(Source: http://www.solstice-mobile.com/blog/big-data-baby-steps)

- Number of emails sent every second: 2.9 million
- Data consumed by households each day: 375 megabytes
- Video uploaded to YouTube every minute: 20 hours
- Data per day processed by Google: 24 petabytes
- Tweets per day: 50 million
- Total minutes spent on Facebook each month: 700 billion
- Data sent and received by mobile internet users: 1.3 exabytes
- Products ordered on Amazon per second: 72.9 items


What is Big Data?
Related
- The datasets that exceed capacity of current computing systems
- To manage, process, or analyze the data with reasonable effort
- Due to Volume, Velocity, Variety
- Examples of Big Data (SBD):
- GPS traces
- Social network data / Twitter data
- Log data
- Bank transaction / credit card transaction
- Mobile phone data
Think of Big Data like trying to drink from a fire hose instead of a water fountain — the "bigness" isn't just about the amount of water, but that your normal cup (computer) simply can't keep up with how fast and how much is coming at you.
Big Data: Physical Scale Limits
- Too big for the CPU memory of any single machine
- 4 slots for desktop (32GB each)
- 12 slots for server
- Larger than the disk storage of a single machine
- 2-4 disks for desktop
- 8 disks for server

What is Big Data? (The Four V's)

- As of 2011, global size of data in healthcare was estimated at 150 exabytes
- By 2014, anticipated 420 million wearable, wireless health monitors
- 40 zettabytes of data will be created by 2020 (300x increase from 2005)
- 6 billion people have cell phones
- 100 terabytes of data stored by most companies in the U.S.
- 30 billion pieces of content shared on Facebook every month
- 400 million tweets sent per day by about 200 million monthly active users
- 1 TB of trade information captured by the New York Stock Exchange during each trading session
- Modern cars have close to 100 sensors that monitor items such as fuel level and tire pressure
- By 2016, 18.9 billion network connections projected (almost 2.5 connections per person on earth)
- 1 in 3 business leaders don't trust the information they use to make decisions
- Poor data quality costs the US economy around $3.1 trillion a year
- 27% of respondents in one survey were unsure of how much of their data was inaccurate
(Sources: McKinsey Global Institute, Twitter, Cisco, Gartner, EMC, SAS, IBM, MEPTEC, QAS — via IBM)
Big Data: Volume (Scale)
- Data volume is increasing exponentially
- 12+ TBs of tweet data every day
- 25+ TBs of log data every day
- ? TBs of data every day (Google, Gmail, Google Talk, etc.)
- 30 billion RFID tags today (1.3 billion in 2005)
- 4.6 billion camera phones worldwide
- 100s of millions of GPS enabled devices sold annually
- 76 million smart meters in 2009... 200 million by 2014
- 2+ billion people on the Web by end of 2011

Big Data: Variety (Complexity)
- Relational Data (Tables/Transaction/Legacy Data)
- Text Data (Web)
- Semi-structured Data (XML)
- Graph Data
- Social Network, Semantic Web (RDF), …
- Streaming Data
- You can only scan the data once
- A single application can be generating/collecting many types of data
- Big Public Data (online, weather, finance, etc)
To extract knowledge → all these types of data need to be linked together

A Single View to the Customer
- A customer connects to many different data sources:
- Social Media: Facebook, Twitter, Pinterest
- Banking Finance: Visa, Chase, American Express
- Gaming: Zynga, Xbox 360
- Our Known History: SAP, IBM
- Entertain: Netflix, Hulu, NFL Network
- Purchase: Nordstrom, Amazon, Lowe's
Imagine trying to understand one person by piecing together fragments from a dozen different notebooks, each written in a different language, style, and format — that's the challenge of "variety" in big data.
Big Data: Velocity (Speed)
- Data is being generated fast and needs to be processed fast
- Online Data Analytics
- Late decisions → missing opportunities
Sources generating high-velocity data:
- Social media and networks (all of us are generating data) — Facebook, Twitter, WordPress, YouTube, Flickr
- Scientific instruments (collecting all sorts of data) — microscopes, telescopes, sensors, lab equipment
- Mobile devices (tracking all objects all the time)
- Sensor technology and networks (measuring all kinds of data)
The progress and innovation is no longer prevented by the ability to collect data. But, by the ability to manage, analyze, summarize, visualize, and discover knowledge from the collected data in a timely manner and in a scalable fashion.
Real-Time Analytics/Decision Requirement
- Product Recommendations that are Relevant & Compelling
- Learning why Customers Switch to competitors and their offers; in time to Counter
- Improving the Marketing Effectiveness of a Promotion while it is still in Play
- Preventing Fraud as it is Occurring & preventing more proactively
- Friend Invitations to join a Game or Activity that expands business
This is like a fire department that needs to know about a fire the instant it starts, not read about it in tomorrow's newspaper — speed of response depends entirely on speed of data delivery.
Big Data: Veracity (Incomplete Data)
- Uncertainty, Data Inconsistency, Ambiguities
- Incompleteness, Unclean
- The biases, noise and abnormality in data
- You need to have your team and partners work to help keep your data clean and processes to keep 'dirty data' from accumulating in your systems
- Pre-Processing step may be needed!

Veracity is like a rumor mill — some of what you hear is true, some exaggerated, some just wrong. Before you can make decisions based on it, you have to sort out what's trustworthy.
Big Data: Four V's — Another View (IBM)
| V | Meaning | Description |
|---|---|---|
| Volume | Data at Scale | Terabytes to petabytes of data |
| Variety | Data in Many Forms | Structured, unstructured, text, multimedia |
| Velocity | Data in Motion | Analysis of streaming data to enable decisions within fractions of a second |
| Veracity | Data Uncertainty | Managing the reliability and predictability of inherently imprecise data types |
Harnessing Big Data
- OLTP: Online Transaction Processing (DBMSs)
- OLAP: Online Analytical Processing (Data Warehousing)
- RTAP: Real-Time Analytics Processing (Big Data Architecture & technology)

Think of it as three generations of how we've asked questions of data: OLTP asks "what is happening right now in this one transaction," OLAP asks "what happened over months of history," and RTAP asks "what is happening across everything, right now, so I can react instantly."
The Model Has Changed…
- The Model of Generating/Consuming Data has Changed
Old Model: Few companies are generating data, all others are consuming data
- (e.g., TV networks and newspapers → the public)
New Model: All of us are generating data, and all of us are consuming data
- (e.g., social media users → each other)
Big Data is Driving Transformative Changes
| Aspect | Traditional | Big Data |
|---|---|---|
| Data Characteristics | Relational (with highly modeled schema) | All Data (with schema agility) |
| Cost | Expensive (storage and compute capacity) | Commodity (storage and compute capacity) |
| Culture | Rear-view reporting (using relational algebra) | Intelligent action (using relational algebra AND ML, graph, streaming, image processing) |
Traditional Business Analytics Process
- Start with end-user requirements to identify desired reports and analysis
- Define corresponding database schema and queries
- Identify the required data sources
- Create an Extract-Transform-Load (ETL) pipeline to extract required data (curation) and transform it to target schema ('schema-on-write')
- Create reports, analyse data


All data not immediately required is discarded or archived.
New Big Data Thinking: All Data Has Value
- All data has potential value
- Collect and Store data forever
- No defined schema—stored in native format
- Schema is imposed and transformations are done at query time (schema-on-read)
- Apps and users interpret the data as they see fit

Schema-on-write is like organizing your closet perfectly before putting anything in it. Schema-on-read is like throwing everything into a big storage room and deciding how to organize it only when you actually need to find something.
Data Are Growing and Changing
- Need to collect any data — harness the growing and changing nature of data
- Structured: databases, tables, forms, transaction records
- Unstructured: voice, social media (Facebook, Twitter), location data, comments, mentions, log data (Hadoop-related)
- Streaming: transit systems, communication signals, RFID/sensor data, medical devices, sensors, tracking data
Key takeaways:
- Challenge is combining transactional data stored in relational databases with less structured data
- Big Data = All Data
- Get the right information to the right people at the right time in the right format

The Data Lake and Warehouse

A data lake is like a big natural lake where all rivers (data sources) flow in freely, unfiltered and unformatted. A data warehouse, by contrast, is like a bottling plant — water goes through a strict process (ETL) before it's stored on the shelf in a specific, labeled bottle (schema).
Big Data Analytics – Data Flow

Big Data Landscape

(Source: http://www.forbes.com/sites/davefeinleib/2012/06/19/the-big-data-landscape/)

(Source: © Matt Turck (@mattturck), Jim Hao (@jimrhao), & FirstMark (@firstmarkcap) — mattturck.com/bigdata2017)
Big Data Workflow
- Identifying and Acquiring Data
- CSV, JSON, API, Streaming, Text, HTML
- Data Managing Team, Legal/Compliance
- Store, Structure, and Pre-Process Data
- Apache Spark, Amazon Cloud, SQL
- Software, System, Data Engineers
- Analyze data via Machine Learning, Design Signals, Backtest Strategies
- R/Python, Spark ML, Tableau, Excel
- Data Scientists, Quantitative Researchers and PMs
- Trade Ideas, Trading Signals, Risk Analyses
- Reports, Alerts, Signals
- Traders, PMs, Execution System
(Source: J.P.Morgan Macro QDS)
Barriers to 'Big Data' Development
- Accessing data – companies reluctant to share, government open data initiatives cover limited sectors
- Privacy – rights-based approaches are not global; 'informed consent' models increasingly impractical; policies do not deal with secondary use of data; unclear boundary between personal and non-personal data
- Analytical/Interpretation – data quality and data source, measurement bias (correlation is not causation) and need for experimental techniques
Case Studies and Applications
Big Data of People Flow from GPS Data

311 Earthquake
- The site of Japan's worst nuclear incident
- People in the restricted area (20 km from the Fukushima DNPP) were forced to evacuate and flee their homes

Emergency Evacuation Monitoring


Estimated and reported migrations along main evacuation routes:
| City Name | Evacuate within prefecture (Auto-GPS) | Evacuate to other prefectures (Auto-GPS) | Evacuate within prefecture (Cabinet office) | Evacuate to other prefectures (Cabinet office) |
|---|---|---|---|---|
| Hirono-machi | 66 | 34 | 65 | 35 |
| Naraha-machi | 65 | 35 | 62 | 38 |
| Tomioka-machi | 49 | 51 | 54 | 46 |
| Kawauchi-mura | 60 | 40 | 69 | 31 |
| Okuma-machi | 58 | 42 | 59 | 41 |
| Futaba-machi | 43 | 56 | 39 | 61 |
| Namie-machi | 49 | 51 | 56 | 44 |
| Katsurao-mura | 75 | 25 | 84 | 16 |
| Sum total | 58.125 | 41.75 | 57 | 43 |
This is a great real-world example of Big Data's Velocity and Veracity in action: GPS data let researchers estimate evacuation patterns near-instantly (velocity), while comparing it against official reports (veracity) to check data reliability.
Data Management for Large-scale Trajectory Data Analysis

- Various kinds of people and patterns exist in large-scale data

- Commodity PC: Scalable — more storage, faster processing
- Robust: Replicate Data
- Distributed Storage & Parallel Processing
Then, How to Deal with Big Data?
Data Processing — Key Ideas
- Hide system-level details from the developers
- No more race conditions, lock contention, etc.
- Scale "out", not "up"
- Limits of SMP and large shared-memory machines
- Move processing to the data
- Clusters have limited bandwidth
- Seamless scalability
- From the mythical man-month to the tradable machine-hour
"Scaling out" is like hiring more workers to split up a job, while "scaling up" is like hiring one super-worker who can do everything alone — but there's a limit to how strong one worker can get, whereas you can almost always add more workers.
Hadoop – Large Scale Data Management
- What is Hadoop & Why?
- An open-source framework, Free!
- Distributed applications for large data
- Parallel processing
- Run on Commodity machines
- Scalable
- Very Famous
- Hive is a data warehousing package on Hadoop with SQL-like querying
In 2011, Facebook claimed that they had the largest Hadoop cluster in the world with 30 PB of storage with nearly 10,000 nodes.
Hive provides a SQL-like language called HiveQL via Web GUI and JDBC
select * from zdcdata where uid = '0051155';- Used by: Yahoo!, Facebook, foursquare, eBay, LinkedIn, Twitter
Database VS Hadoop
| Database | Hadoop | |
|---|---|---|
| Data size | Gigabytes | Petabytes |
| Access | Interactive and batch | Batch |
| Updates | Read and write many times | Write once, read many times |
| Structure | Static schema | Dynamic schema |
| Integrity | High | Low |
| Scaling | Nonlinear | Linear |
Think of a traditional database like a library with a strict card catalog system (static schema) that anyone can walk in and update at any time. Hadoop is more like an archive warehouse — you write things once and read them many times, and you scale it just by adding more shelves (linear scaling), rather than needing a completely new, more powerful building.
Hadoop Main Components

- Robust: Replicate Data among data nodes
- Keep Metadata & Distribute Job: NameNode/JobTracker
- Add more node: scalability by adding DataNode/TaskTracker pairs
Component Descriptions
- NameNode is the bookkeeper of HDFS; it keeps track of how your files are broken down into file blocks, which nodes store those blocks, and the overall health of the distributed filesystem
- Datanodes are the workhorses of the filesystem. They store and retrieve blocks when they are told to (by clients or the namenode), and they report back to the namenode periodically with lists of blocks that they are storing
- Secondary NameNode (SNN) is an assistant daemon for monitoring the state of the cluster HDFS and the SNN helps snapshot the NameNode to help minimize the downtime and loss of data
- JobTracker is the liaison between your application and Hadoop. Once you submit your code to your cluster, the JobTracker determines the execution plan by determining which files to process, assigns nodes to different tasks, and monitors all
- TaskTrackers is responsible for executing the individual tasks that the JobTracker assigns and manages the execution of individual tasks on each slave node
Think of NameNode as the head librarian who knows exactly which shelf (DataNode) every book (data block) sits on, but doesn't hold any books themselves. The Secondary NameNode is like an assistant librarian who periodically backs up the head librarian's card catalog in case something happens to it.
Hadoop Ecosystem

Projects Under the Hadoop Umbrella
- Common — A set of components and interfaces for distributed file systems and general I/O (serialization, Java RPC, persistent data structures)
- MapReduce — A distributed data processing model and execution environment that runs on large clusters of commodity machines
- HDFS — A distributed filesystem that runs on large clusters of commodity machines
- Hive — A distributed data warehouse. Hive manages data stored in HDFS and provides a query language based on SQL (translated by the runtime engine to MapReduce jobs) for querying the data
- Spark — A multi-language engine for executing data engineering, data science, and machine learning on single-node machines or clusters
- Sqoop — A tool for efficiently moving data between relational databases and HDFS
- Hbase — A distributed, column-oriented database. HBase uses HDFS for its underlying storage, and supports both batch-style computations using MapReduce and point queries (random reads)
- ZooKeeper — A distributed, highly available coordination service. It provides primitives such as distributed locks that can be used for building distributed applications
- Pig — A data flow language and execution environment for exploring very large datasets. Pig runs on HDFS and MapReduce clusters
- Ambari — A web-based tool for provisioning, managing, and monitoring Apache Hadoop clusters which includes support for Hadoop. It also provides a dashboard for viewing cluster health visually
- Mahout — A scalable machine learning and data mining library
Ambari Web Management For Hadoop



Hadoop Ecosystem — Cloudera Enterprise

Hadoop Ecosystem — Hortonworks Data Platform 2.5

Simply put, Hortonworks ties all the open source products together (22)
Summary
- Big Data Concept
- Four V's of Big Data
- Volume, Variety, Velocity, Veracity
- How to deal with Big Data
- Storage and processing power
- Hadoop Platform and its Ecosystem
- HDFS, Ambari