📚 Chapters

⛏️ Data Mining

Unit 3 — Big Data, MapReduce, Hadoop & Data Warehousing

🌐Chapter 1 — Big Data and Data Analysis
🌐 CHAPTER 1 — BIG DATA AND DATA ANALYSIS MIND MAP
Big data → Data too large, fast or varied for normal tools
Characteristics → Volume, Velocity, Variety, Veracity, Value
Challenges → Storage, speed, quality, security, skills, cost
Comparison → Big data vs data science vs data analytics vs big data analytics

1. What is Big Data?

📖 Big data means data that is so large, fast or varied that normal software on a single computer cannot store or process it easily.
💡 Examples: Google searches (billions a day), YouTube videos, WhatsApp messages, UPI and card payments, sensors in a factory, GPS data of cabs, hospital records and scans.
KB→MB→GB→TB→PB→EB→ZB
Each unit is about 1000 times (1024 times in binary counting) bigger than the one before it. Big data is usually measured in terabytes, petabytes and beyond.
SourceKind of data
Social mediaPosts, photos, videos, likes
Online shoppingClicks, orders, reviews
Sensors and IoTTemperature, location, machine logs
Banking and telecomTransactions, call records
HealthcareReports, scans, wearable data
Big data is not just "a lot of data". It is data for which storing and processing on one machine is not practical, so many machines work together.

2. Characteristics of Big Data (the 5 Vs)

📖 The Vs of big data describe what makes it special. The first three (Volume, Velocity, Variety) are the classic ones. Veracity and Value are the usual additions.
📦 VolumeHuge amount of data. Terabytes to petabytes. Example: all UPI payments in a day.
⚡ VelocityData arrives very fast, often in real time. Example: live stock prices, sensor readings.
🧩 VarietyMany forms: tables, text, images, video, logs. Example: a hospital has reports, scans and notes.
🔎 VeracityData may be noisy or untrustworthy. Example: fake reviews, wrong sensor values.
💎 ValueData is useful only if it gives business value. Example: better offers, fewer frauds.
VQuestion it answersExample
VolumeHow much?Petabytes of video
VelocityHow fast?Thousands of transactions per second
VarietyHow many forms?Text, image, audio, logs
VeracityHow trustworthy?Noisy sensor data
ValueHow useful?Fraud alerts that save money

3. Challenges of Big Data

ChallengeMeaningHow it is handled
StorageData does not fit on one diskDistributed storage (HDFS), cloud
Processing speedOne computer is too slowParallel processing (MapReduce, Spark)
Data quality (veracity)Noisy, missing, duplicate dataCleaning and validation (Unit 1)
Variety and integrationMany formats and sourcesETL, schema-on-read, NoSQL
Privacy and securityPersonal data can leak or be misusedEncryption, access control, laws
SkillsFew people know the toolsTraining, easier tools
CostHardware and software are expensiveCheap commodity hardware, cloud pay-as-you-go
ScalabilityData keeps growingAdd more machines (scale out)
Scale up = buy one bigger, costlier computer. Scale out = add more ordinary computers. Big data systems like Hadoop scale out.

4. Big Data vs Data Science vs Data Analytics vs Big Data Analytics

📖 These four terms are related but different. A common way to remember: big data is the raw material, data science is the whole field, data analytics is the analysis work and big data analytics is analysis done on big data.
Big dataData scienceData analyticsBig data analytics
What it isVery large, fast, varied dataA field that uses statistics, programming and domain knowledge to get insight and build modelsExamining data to find useful information and support decisionsAnalysing big data to find patterns, trends and relationships
FocusThe data itselfInsight and prediction (also builds ML models)Answering business questionsInsight from huge data
Typical toolsHadoop, HDFS, NoSQLPython, R, ML librariesExcel, SQL, Tableau, Power BIHadoop, Spark, Hive
OutputData to be processedModels and predictionsReports and dashboardsLarge-scale patterns and predictions
ExampleAll taxi GPS recordsPredict taxi demand with MLWeekly report of trips per cityReal-time demand across the whole country
Four types of analytics
Descriptive: What happened?→Diagnostic: Why did it happen?→Predictive: What will happen?→Prescriptive: What should we do?
TypeQuestionExample
DescriptiveWhat happened?Sales fell 10% last month
DiagnosticWhy did it happen?A competitor cut prices
PredictiveWhat will happen?Sales will fall again next month
PrescriptiveWhat should we do?Offer a discount on slow items
💡 Analogy: A farm is the big data. A farmer who studies crops with science is data science. Counting this season's harvest is data analytics. Counting the harvest of thousands of farms with big machines is big data analytics.
🐘Chapter 2 — MapReduce, Hadoop, HDFS and Data Warehousing
🐘 CHAPTER 2 — MAPREDUCE, HADOOP, HDFS AND DATA WAREHOUSING MIND MAP
MapReduce → Split → Map → Shuffle and sort → Reduce
Hadoop → HDFS + YARN + MapReduce, plus Hive, Pig, HBase, Spark
HDFS → NameNode + DataNodes, blocks of 128 MB, replication 3
Data warehouse → Subject-oriented, integrated, time-variant, non-volatile. ETL, star schema

1. Why Distributed Processing?

📖 Idea: If one computer needs 10 hours for a job, then 10 computers working together can finish it in about 1 hour. Big data tools split the data and the work over many machines (a cluster).
💡 Analogy: Counting votes of a whole country. One person would take months. A thousand polling teams count their own booths at the same time, and then the totals are added.
  • Move code to data: sending a small program to where the data lives is cheaper than moving huge data over the network
  • Fault tolerance: with thousands of cheap machines, failures are normal, so the system must survive them
  • Commodity hardware: ordinary, cheap machines instead of one very costly server

2. MapReduce

📖 MapReduce: A programming model for processing big data in parallel. The programmer writes only two functions: Map and Reduce. All data moves as (key, value) pairs.
Input split→Map→Shuffle and sort→Reduce→Output
PhaseWhat happens
Input splitThe input file is cut into pieces. Each piece goes to one mapper
MapEach mapper reads its piece and emits (key, value) pairs
Shuffle and sortAll pairs with the same key are brought to the same reducer and sorted by key
ReduceThe reducer combines all values of a key into a result
OutputResults are written to HDFS
📐 Word count (the "Hello World" of MapReduce)
map(line): for each word w in line → emit (w, 1)
reduce(word, [1, 1, …]): emit (word, sum of the list)
Worked example: count the words
MapperInput lineMap output (word, 1)
M1deer bear river(deer,1), (bear,1), (river,1)
M2car car river(car,1), (car,1), (river,1)
M3deer car bear(deer,1), (car,1), (bear,1)
Shuffle and sort now groups the pairs by key, and reduce adds up each list.
Key (word)Values after shuffle and sortReduce output (sum)
bear[1, 1](bear, 2)
car[1, 1, 1](car, 3)
deer[1, 1](deer, 2)
river[1, 1](river, 2)
Result: bear = 2, car = 3, deer = 2, river = 2.
Extra partRole
CombinerOptional "mini-reducer" on the mapper side. Example: mapper 2 sends (car, 2) instead of (car, 1) twice. Less network traffic
PartitionerDecides which reducer gets which key (default: hash(key) mod number of reducers)
Fault toleranceIf a mapper or reducer fails, the task is simply run again on another machine
Links to earlier units: K-means on Hadoop: Map assigns each point to the nearest centroid and Reduce computes the new centroids. Apriori on Hadoop: Map and Reduce count the support of itemsets, like word count.

3. Hadoop

📖 Hadoop: An open-source framework (Apache) to store and process big data on clusters of ordinary computers. It was inspired by Google's papers on GFS (file system) and MapReduce.
HivePigHBaseSparkMapReduce (processing)YARN (resource management)HDFS (storage)Ecosystem tools on top, core Hadoop below
Core componentJob
HDFSDistributed storage
YARNManages cluster resources and schedules jobs (from Hadoop 2)
MapReduceProcessing engine
Hadoop CommonShared libraries and utilities
Ecosystem toolUse
HiveSQL-like queries (HiveQL) on big data
PigScripting language for data flows
HBaseNoSQL database on top of HDFS
SqoopMoves data between Hadoop and relational databases
FlumeCollects log data into Hadoop
SparkFast, in-memory processing
ZooKeeperCoordination of services
Why Hadoop? Scalable (add machines), fault tolerant, low cost, handles structured and unstructured data, and works on the "write once, read many" model.

4. HDFS — Hadoop Distributed File System

📖 HDFS: The storage layer of Hadoop. It splits big files into blocks, stores them on many machines and keeps copies so that data is safe.
NameNode (metadata)DataNode 1Block 1Block 3Block 4DataNode 2Block 1Block 2Block 4DataNode 3Block 1Block 2Block 3DataNode 4Block 2Block 3Block 4
A 500 MB file is cut into 4 blocks. Each block is stored on 3 different DataNodes (replication factor 3). If one DataNode fails, every block is still available.
PartRole
NameNode (master)Keeps the metadata: file names, which blocks make a file, and which DataNode holds each block. One active NameNode (Hadoop 2 adds a standby for high availability)
DataNode (slave)Stores the actual blocks, serves read and write requests, sends heartbeats and block reports to the NameNode
Secondary NameNodeHelps the NameNode with checkpoints of its metadata. It is not a hot backup
BlockDefault size 128 MB (a normal file system uses about 4 KB)
Replication factorDefault 3: every block is stored on 3 DataNodes (on different racks when possible)
Worked example: storing a 500 MB file
  1. Block size 128 MB, so the file needs ⌈500 / 128⌉ = 4 blocks
  2. Blocks: 128 MB, 128 MB, 128 MB and the last one of 116 MB (HDFS does not waste the unused space)
  3. With replication 3, there are 4 × 3 = 12 block copies
  4. Disk space used = 500 × 3 = 1500 MB
How a file is written
  1. The client asks the NameNode to create the file
  2. The file is split into blocks. The NameNode tells which DataNodes should store each block
  3. The client sends a block to the first DataNode, which passes it to the second, then the third (a pipeline)
  4. Acknowledgements come back and the NameNode records the metadata
HDFSNormal file system
Block size128 MB (large)About 4 KB
Data lives onMany machinesOne machine
Failure handlingReplication, automatic recoveryNeeds backup
Access patternWrite once, read many (streaming)Read and write anywhere
Best forVery large filesMany small files

5. Data Warehousing

📖 Data warehouse: A large store of data collected from many sources, kept for analysis and decision-making (not for daily transactions). Four properties (Inmon): subject-oriented (organised by topics like sales), integrated (one consistent format), time-variant (keeps history), non-volatile (data is not changed or deleted once loaded).
💡 Analogy: A shop's billing counter records each sale (daily work). The head office warehouse collects the bills of all branches for many years, so management can study trends.
Data sources (databases, files, web)→ETL: Extract → Transform → Load→Data warehouse (+ data marts)→OLAP, reports, data mining
StepMeaning
ExtractRead data from the source systems
TransformClean, convert formats, remove duplicates, combine (Unit 1 pre-processing)
LoadWrite the data into the warehouse
OLTP (operational database)Data warehouse (OLAP)
PurposeDaily transactionsAnalysis and reporting
DataCurrent, detailedHistorical, summarised
QueriesShort, simple, manyLong, complex, few
UsersClerks, customersManagers, analysts
DesignNormalized tablesStar or snowflake schema
Star schema
DateProductStoreCustomerSales (fact)units, amount
Star schema: one central fact table (the numbers) joined to dimension tables (the descriptions).
A fact table stores the measurements (units sold, amount). Dimension tables describe them (date, product, store, customer). In a snowflake schema the dimension tables are further split into smaller tables. A data mart is a smaller warehouse for one department.
Data warehouse vs data lake: a warehouse holds cleaned, structured data (schema defined before loading). A data lake holds raw data of any type (schema applied when reading). OLAP cubes (Unit 1) are built on top of a warehouse.
🔁Chapter 3 — Recap and Vector Calculus
🔁 CHAPTER 3 — RECAP LISTED IN THIS UNIT AND VECTOR CALCULUS
K-means → Centroids and clusters
Apriori → Frequent itemsets and rules
Recommendation → Content-based and collaborative
Vector calculus → Gradient, divergence, curl

1. Recap: K-Means Clustering

The syllabus lists these topics again under Unit 3. They are explained in full, with worked examples, in Unit 2 (Chapter 3). Here is the short version.
K-means splits data into k clusters. Steps: choose k centroids → assign each point to the nearest centroid → move each centroid to the mean of its points → repeat until nothing changes.
✕✕✕ = centroid of each cluster123456elbow: k = 3WCSS (total spread inside clusters)number of clusters k →
On Hadoop: Map = assign each point to the nearest centroid (key = cluster id). Reduce = compute the new centroid as the mean of the points of that cluster. Repeat the job until the centroids stop moving.

2. Recap: Association Rules, Apriori and Market Basket Analysis

MeasureFormula
Support(transactions with A and B) / (all transactions)
Confidencesupport(A and B) / support(A)
Liftconfidence / support(B). Lift > 1 means a positive link
Apriori: find frequent single items, join them into pairs, then triples, and so on. The Apriori property says every subset of a frequent itemset is also frequent, so unpromising candidates are pruned early. Then make rules from the frequent itemsets.
Example (Unit 2): in 5 baskets, beer → diaper has support 60%, confidence 100% and lift 1.25. On Hadoop: counting the support of each itemset is a word-count style MapReduce job.

3. Recap: Recommendation Systems

TypeIdea
Content-basedSuggest items similar to what the user liked (uses item features)
Collaborative filteringSuggest what similar users liked (uses the user–item rating matrix)
HybridCombine both
Example (Unit 2): Alice's missing rating for Movie 3 is predicted as the similarity-weighted average of her neighbours' ratings = 3.88. Problems: cold start, sparsity, scalability. Big data tools such as Spark run recommenders on millions of users.

4. Vector Calculus — Quick Basics

The unit heading in the syllabus says "Vector Calculus", but the listed topics are about big data. A short review is added here in case it is asked.
📖 Vector calculus is calculus for quantities with direction (vectors) and for functions of several variables. It is the maths behind gradient descent, the method that trains most machine learning models.
IdeaMeaningFormula
Partial derivativeRate of change in one variable, others fixed∂f/∂x
Gradient ∇fVector pointing in the direction of steepest increase∇f = (∂f/∂x, ∂f/∂y)
DivergenceHow much a vector field spreads out from a pointdiv F = ∂P/∂x + ∂Q/∂y + ∂R/∂z
CurlHow much a vector field rotates around a pointcurl F = ∇ × F
Dot productMeasures how aligned two vectors area·b = Σ aᵢbᵢ
Worked example: gradient and gradient descent for f(x, y) = x² + y²
  1. ∂f/∂x = 2x and ∂f/∂y = 2y, so ∇f = (2x, 2y)
  2. At the point (1, 2): ∇f = (2, 4)
  3. Gradient descent moves against the gradient: new point = (1, 2) − 0.1 × (2, 4) = (0.8, 1.6)
  4. f falls from 5 to 3.20. Repeating gets closer to the minimum at (0, 0)
Small example of divergence and curl: for F = (x, y), div F = 1 + 1 = 2 (field spreads out). For F = (−y, x), the curl (z-part) = ∂x/∂x − ∂(−y)/∂y = 1 + 1 = 2 (field rotates).
⚡Ready for Exam?Sab padh liya? Ab Quick Revision karo — definition, example aur diagram ek jagah!Quick Revision Karo →
⚡Quick Revision — Last Minute Exam Prep!
📌 How to use: Har topic mein pehle Definition, phir Example, phir Diagram hai.

🌐 Chapter 1 — Big Data and Data Analysis

1. Big Data and the 5 Vs
📖 Definition: Data too large, fast or varied for one computer. Volume, Velocity, Variety, Veracity, Value.
💡 Example: Live UPI payments: huge volume, high velocity.
📦 VolumeHuge amount of data. Terabytes to petabytes. Example: all UPI payments in a day.
⚡ VelocityData arrives very fast, often in real time. Example: live stock prices, sensor readings.
🧩 VarietyMany forms: tables, text, images, video, logs. Example: a hospital has reports, scans and notes.
🔎 VeracityData may be noisy or untrustworthy. Example: fake reviews, wrong sensor values.
💎 ValueData is useful only if it gives business value. Example: better offers, fewer frauds.
2. Challenges
📖 Definition: Storage, processing speed, quality, privacy, skills, cost, scalability.
💡 Example: One disk cannot hold the data → distributed storage (HDFS).
ChallengeRemedy
StorageHDFS, cloud
SpeedMapReduce, Spark
QualityCleaning
SecurityEncryption
3. Big Data vs Data Science vs Analytics
📖 Definition: Big data = data. Data science = whole field. Data analytics = analysis. Big data analytics = analysis of big data.
💡 Example: Taxi GPS records (big data) → demand model (data science) → weekly report (analytics).
Descriptive: What happened?→Diagnostic: Why did it happen?→Predictive: What will happen?→Prescriptive: What should we do?

🐘 Chapter 2 — MapReduce, Hadoop, HDFS, Data Warehousing

1. MapReduce
📖 Definition: Programming model with Map and Reduce on (key, value) pairs. Phases: split, map, shuffle and sort, reduce.
💡 Example: Word count: bear 2, car 3, deer 2, river 2.
Input split→Map→Shuffle and sort→Reduce→Output
Key (word)Values after shuffle and sortReduce output (sum)
bear[1, 1](bear, 2)
car[1, 1, 1](car, 3)
deer[1, 1](deer, 2)
river[1, 1](river, 2)
2. Hadoop
📖 Definition: Open-source framework: HDFS (storage) + YARN (resources) + MapReduce (processing).
💡 Example: Hive for SQL, Pig for scripts, HBase for NoSQL, Spark for fast processing.
HivePigHBaseSparkMapReduce (processing)YARN (resource management)HDFS (storage)Ecosystem tools on top, core Hadoop below
3. HDFS
📖 Definition: NameNode keeps metadata. DataNodes store blocks. Block 128 MB, replication 3.
💡 Example: 500 MB file = 4 blocks (128, 128, 128, 116 MB), 12 copies, 1500 MB used.
NameNode (metadata)DataNode 1Block 1Block 3Block 4DataNode 2Block 1Block 2Block 4DataNode 3Block 1Block 2Block 3DataNode 4Block 2Block 3Block 4
A 500 MB file is cut into 4 blocks. Each block is stored on 3 different DataNodes (replication factor 3). If one DataNode fails, every block is still available.
4. Data Warehousing
📖 Definition: Subject-oriented, integrated, time-variant, non-volatile store for analysis. Built with ETL.
💡 Example: Sales star schema: Sales fact + Date, Product, Store, Customer dimensions.
Data sources (databases, files, web)→ETL: Extract → Transform → Load→Data warehouse (+ data marts)→OLAP, reports, data mining
DateProductStoreCustomerSales (fact)units, amount
Star schema: one central fact table (the numbers) joined to dimension tables (the descriptions).

🔁 Chapter 3 — Recap and Vector Calculus

1. K-means, Apriori, Recommendation
📖 Definition: Short recap of Unit 2 topics listed again in this unit.
💡 Example: K-means on Hadoop: Map assigns, Reduce averages. Apriori support counting is word count.
✕✕✕ = centroid of each cluster
2. Gradient
📖 Definition: Vector of partial derivatives pointing to steepest increase. Gradient descent moves against it.
💡 Example: f = x² + y² at (1, 2): gradient (2, 4). One step with 0.1 gives (0.8, 1.6).
📐 Remember
∇f = (∂f/∂x, ∂f/∂y)
div F = ∂P/∂x + ∂Q/∂y + ∂R/∂z
new point = old point − η ∇f
📄Previous Year Questions

Previous Year Question Paper Not Available Yet

Unit 3 question papers are not available yet. If you have one, please share it through the contact page so it can be added for other students.