0% found this document useful (0 votes)
9 views32 pages

Data Science Introduction in Hinglish

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views32 pages

Data Science Introduction in Hinglish

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to Data Science (Very Detailed

Hinglish)
Data Science kya hota hai?

Data Science ek field hai jisme data ko collect, clean, analyze, visualize, model karke useful
insights nikale jaate hain.
Simple words me:
�“Raw data ko information me convert karna.”

Iske 3 main pillars:


1�⃣ Statistics & Mathematics – patterns samajhne ke liye
2�⃣ Programming (Python/R) – algorithms aur models banane ke liye
3�⃣ Domain Knowledge – real-world problem ko samajhne ke liye

Why Data Science is important?

 Companies ke paas huge data hota hai


 Data Science se decision-making improve hoti hai
 Business predictions accurate hote hain
 Fraud detection, recommendation, automation possible hota

Example:

 Netflix suggests movies → Data Science


 Google Maps shortest path → Data Science
 Banks detect fraud → Data Science

Data Science Workflow (Steps)

1. Data Collection
o Sensors, database, web scraping, logs
2. Data Cleaning
o Missing values, duplicates, noise remove
3. Exploratory Data Analysis (EDA)
o Data ka structure samajhna
4. Feature Engineering
o Useful features create karna
5. Model Building
o ML algorithms apply karna
6. Model Evaluation
o Accuracy, error metrics evaluate
7. Deployment
o Model ko real-world me use karna

Tools Used in Data Science

 Python Libraries → NumPy, Pandas, Matplotlib, Scikit-learn


 Visualization → Power BI, Tableau
 Databases → MySQL, MongoDB
 Big Data → Hadoop, Spark

⭐ 2. Exploratory Data Analysis (EDA) –


Detailed Hinglish
EDA kya hota hai?

EDA ek process hai jisme data ko ―explore‖ karke samajhte hain ki:

 Data kis type ka hai?


 Kya pattern, trend or relation exist karta?
 Kya outliers ya missing values hain?

Simple words me:


�“Data ko jaanne ka first step.”

EDA ka Importance

 Data ki quality check hoti hai


 Future modelling easy hota
 Insights milte hain
 Outliers detect hote hain
 Correct model choose karne me help

Types of EDA
1. Numerical Analysis

Numerical data ke liye statistics use hoti hain:

 Mean
 Median
 Mode
 Variance
 Standard deviation

2. Categorical Data Analysis

Category counts, frequency distribution.

EDA Techniques

A) Summary Statistics

 Minimum value
 Maximum value
 Average
 Count

B) Data Visualization

Visualization se pattern aur relation clear dikhte hain.


Common graphs:

1. Histogram – data distribution


2. Box Plot – outliers check
3. Scatter Plot – relationship check
4. Bar Chart – categories comparison
5. Heatmap – correlation matrix

EDA Practical Example

Suppose tumhare paas house price dataset hai.


EDA me tum check karoge:

 Kis area me house price zyada?


 Square feet ke sath price increase hota?
 Kya missing values hain?
 Koi extreme outlier (very high price) to nahi?

⭐ 3. Introduction to Machine Learning


(Detailed Hinglish)
Machine Learning kya hai?

Machine Learning (ML) ek technique hai jisme hum computer ko ―data se seekhne‖ allow karte
hain.
Computer rule-based programming nahi karta; instead:
�“Model patterns sikhta hai aur future predictions karta hai.”

Types of Machine Learning

1. Supervised Learning

Input + Output dono available.


Model yeh output predict karna seekhta.

Examples:

 Price prediction (regression)


 Spam detection (classification)

2. Unsupervised Learning

Sirf input data hota.


Model automatically patterns find karta.

Examples:

 Clustering
 Dimensionality reduction

3. Reinforcement Learning
Machine reward–punishment dekhkar learn karti.
Example:

 Self-driving cars
 Game playing bots

Machine Learning Use Cases

 Face recognition (Facebook)


 Voice assistants (Siri, Alexa)
 Loan approval
 Disease detection
 Product recommendation (Amazon)

1. MACHINE LEARNING (Detailed


Hinglish)
⭐Machine Learning kya hota hai?

Machine Learning (ML) ek technique hai jisme computer ko explicitly program nahi kiya
jata, balki use data dekar sikhaya jata hai.

Simple words me:


�“ML ek system banata hai jo past data se patterns seekh kar future predictions karta hai.”

⭐Why Machine Learning is needed?

 Human data manually analyze nahi kar sakte


 Billions of records me pattern find karna impossible
 ML systems faster, accurate aur automated hote hain

Example:

 YouTube video recommendation


 Google spam detection
 Online shopping product recommendation
 Stock market prediction
 Face unlock
⭐Types of Machine Learning

1⭐⃣ Supervised Learning

Input (X) + Output (Y) dono available


Model mapping learn karta hai:
X→Y

Examples:

 Classification (spam/ham, pass/fail)


 Regression (price prediction)

2⭐⃣ Unsupervised Learning

Sirf input data hota hai, output nahi.


Model automatically patterns find karta.

Examples:

 Clustering (k-means)
 Grouping customers
 Dimensionality reduction (PCA)

3⭐⃣ Reinforcement Learning

Agent environment me action leta → reward milta → policy improve hoti.


Used in:

 robots
 games
 self-driving cars

⭐ 2. LINEAR REGRESSION &


REGULARIZATION (Detailed Hinglish)
⭐ A) Linear Regression (Detailed)
Linear Regression ek supervised learning algorithm hai jisme hum continuous numerical
output predict karte hain.

Examples:

 House price prediction


 Salary prediction
 Temperature forecasting

⭐Linear Regression ka Formula

y = mX + c

 X → input
 y → output predicted
 m → slope
 c → intercept

Model ka goal:
�Error minimize karna
�Best-fit line draw karna

Error = (Predicted − Actual)²


Total error minimize by Gradient Descent.

⭐Types of Linear Regression

1⭐⃣ Simple Linear Regression

1 input variable
Example:
Square feet → price

2⭐⃣ Multiple Linear Regression

Multiple input variables


Example:
Bedrooms + Area + Location → price
⭐Problems in Linear Regression

1. Overfitting – training data me accurate, test data me poor


2. Multicollinearity – inputs highly correlated
3. Noise sensitive – outliers ke effect me line shift ho jati

Solution: Regularization

⭐ B) Regularization (Very Important)


Regularization ek technique hai jisme cost function me penalty add ki jaati hai
so that large coefficients penalize ho jaye and overfitting reduce ho.

⭐Types of Regularization

⭐⃣ Ridge Regression (L2 Regularization)

Penalty term:
�λ Σ (weights²)

Features ka weight reduce hota hai but zero nahi hota.

Used when → multicollinearity high ho.

⭐⃣ LASSO Regression (L1 Regularization)

Penalty term:
�λ Σ |weights|

Important property:
� LASSO some weights ko ZERO bana deta
�Means automatic feature selection

Very important in ML pipelines.


⭐⃣ Elastic Net

L1 + L2 dono ka combination.
Better when:

 dataset large ho
 high correlation ho

⭐ 3. MODEL SELECTION &


EVALUATION (Detailed)
Model bana diya, ab best model kaise choose kare?
Iske liye evaluation and validation techniques use hoti hain.

⭐ A) Train-Test Split
Dataset ko do parts me divide karte:

 Training set → 70–80%


 Testing set → 20–30%

Model training ke baad test set pe performance check hoti.

⭐ B) Cross-Validation (Very Important)


Best model choose karne ke liye use hota.
Most common method:
�k-fold Cross Validation

Steps:

 Data ko k equal parts me divide karo


 Har part ko ek baar test karo
 Baaki k-1 parts training ke liye

Advantages:
 Overfitting detect hota
 Performance stable hoti

⭐ C) Evaluation Metrics

⭐For REGRESSION:

1. MSE – Mean Squared Error


2. RMSE – Root Mean Squared Error (easy interpretation)
3. MAE – Mean Absolute Error
4. R² Score – model kitna variance explain karta

⭐For CLASSIFICATION:

1. Accuracy
2. Precision
3. Recall
4. F1 Score
5. Confusion Matrix
6. ROC-AUC Curve

⭐ D) Bias vs Variance
 High Bias → underfitting
 High Variance → overfitting

Goal:
�Balance achieve karna (Bias-Variance Tradeoff)

⭐ E) Hyperparameter Tuning
Best model settings choose karne ke liye:
 Grid Search
 Random Search
 Bayesian Optimization

⭐ Summary (1-line per topic for viva)


 Machine Learning: Data se seekhne wala algorithm.
 Linear Regression: Continuous value predict karta.
 Regularization: Overfitting ko control karta (L1, L2).
 Model Evaluation: Accuracy, RMSE, F1-score se model check hota.
 Model Selection: Cross-validation se best model milta.

1. Classification: kNN (k-Nearest Neighbors)


– Detailed Hinglish
kNN kya hota hai?

kNN ek instance-based (lazy learner) supervised algorithm hai.


Prediction ke time pe model nearest k points dekhta hai aur unki majority class return karta.

�Simple logic:
"Jinke saath rehna chaho, unke jaise ban jao."

⭐How kNN works?

1. ek new data point aaya


2. distance calculate karo (Euclidean distance use hota)
3. nearest k neighbors identify karo
4. majority voting → final class

⭐Distance Formula (Euclidean)

(x2−x1)2+(y2−y1)2\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}(x2−x1)2+(y2−y1)2

⭐Example (Simple + Viva-ready)


Tumhare paas student data hai:

 Marks
 Attendance
 Result (Pass/Fail)

A new student ka data aaya.


kNN nearest k similar students dekhega.

Agar nearest 5 students me se:

 4 pass
 1 fail

Prediction → Pass

⭐Advantages

✔ Simple to understand
✔ No training time
✔ Works well for small datasets

⭐Disadvantages

�Slow for large data


�Scaling required
�Sensitive to noise

⭐ 2. Classification: Decision Trees – Detailed


Hinglish
Decision Tree kya hota hai?

Decision Tree ek tree-like model hai jisme har node ek question hota hai.
Tree follow karte hue leaf node par final result milta.
� Like: ―Question → Answer → Next Question → Final Result‖

⭐Structure

 Root Node – starting question


 Internal Nodes – more questions
 Leaf Node – final class label

⭐How it works?

Tree best feature select karta based on:

 Gini Index
 Entropy / Information Gain

Ye metrics batate hain kaunsa feature zyada information deta.

⭐Example (Easy Viva Answer)

Loan approval system:

Root question:
✔ ―Salary > 30,000?‖

 Haan → Next question: ―Credit Score > 700?‖


 Nahi → Reject

Aise tree aage badhta hai.

Finally → Approved/Rejected class milta.

⭐Advantages

✔ Understandable & interpretable


✔ Non-linear data handle karta
✔ Categorical data support
⭐Disadvantages

�Overfitting easily
�Small changes data → big changes tree structure

⭐ 3. Classification: SVM (Support Vector


Machine) – Detailed Hinglish
⭐SVM kya hota hai?

SVM ek supervised algorithm hai jo data ko separate karne ke liye best boundary (hyperplane)
find karta hai.

�Goal:
Classes ko maximum distance (margin) se alag rakhna.

⭐Key Concepts

1. Hyperplane

Line/plane jo classes ko separate karta.

2. Margin

Hyperplane aur nearest data points (support vectors) ke beech distance.


Greater margin → better generalization.

3. Support Vectors

Most important data points jo boundary define karte.

⭐SVM Handles Non-Linear Data (Kernel Trick)

Agar data linearly separate nahi hota, SVM kernel use karta:
 Linear
 Polynomial
 RBF (most common)

Kernel data ko higher dimension me map karta → easily separable ho jata.

⭐Example (Viva-ready)

Tumhare paas Do classes hain:

 Apples
 Oranges

Data overlapping na ho to SVM ek straight line use karega.


Agar overlapping ho to RBF kernel use karke curved boundary banata hai.

⭐Advantages

✔ Works well for high-dimensional data


✔ Good for classification
✔ Best boundary banata (maximum margin)

⭐Disadvantages

�Slow for large datasets


�Parameter tuning tough
�Hard to interpret

⭐ 4. Ensemble Methods: Random Forest –


Detailed Hinglish
Random Forest kya hota hai?
Random Forest ek ensemble learning method hai jisme multiple decision trees ka combination
hota hai.

�Concept:
"1 tree galat ho sakta, but 100 trees ka decision sahi hota."

⭐How Random Forest Works?

1. Dataset ke multiple random subsets banao


2. Har subset par ek decision tree train karo
3. Prediction time:
o Classification → majority vote
o Regression → average

⭐Example (Viva-ready)

Agar 5 trees ne prediction diya:

 Yes, Yes, No, Yes, No


Majority = Yes

Final output = Yes

⭐Why Random Forest is powerful?

 Overfitting reduce hota


 High accuracy
 Large datasets handle karta
 Missing values handle

⭐Advantages

✔ Robust + stable
✔ Works for regression & classification
✔ Automatically feature importance deta
⭐Disadvantages

�Slow for too many trees


� Interpret karna difficult (not transparent)

⭐ Quick Revision Table (Viva Booster)


Algorithm Type Key Idea Best Use Case
kNN Supervised Nearest neighbors Small dataset classification
Decision Tree Supervised Tree of questions Rule-based systems
SVM Supervised Best separating boundary High dimensional classification
Random Forest Ensemble Many trees + voting High accuracy & robustness

1. Intro to Probability (Probability Basics) –


Hinglish Explanation
Probability ka matlab hota hai kisī event ke hone ke chances.

⭐Important Terms:

 Experiment: Koi bhi random activity (ex: coin toss).


 Sample space: Possible outcomes ka set (ex: {H, T}).
 Event: Specific outcome (ex: Head aana).
 Probability Formula:

P(E)=Favourable OutcomesTotal OutcomesP(E) = \frac{\text{Favourable Outcomes}}{\text{Total


Outcomes}}P(E)=Total OutcomesFavourable Outcomes

⭐Example:

 Coin toss → 2 outcomes


Probability(Head) = 1/2
 Dice roll → Probability(3) = 1/6

⭐Why Needed in Data Science?

Machine learning models probability ko use karke decisions lete hain.


Ex—Spam detection, classification, recommendation.
⭐ 2. Naïve Bayes Classifier – Hinglish
Explanation
Naïve Bayes ek probabilistic classification algorithm hai jo Bayes Theorem use karta hai.

⭐Bayes Theorem

P(A∣B)=P(B∣A) P(A)P(B)P(A|B) = \frac{P(B|A)\,P(A)}{P(B)}P(A∣B)=P(B)P(B∣A)P(A)

Iska simple matlab:


A hone ke chances given B happened.

⭐Naïve Bayes Assumption:

Features are independent (each feature ka dusre feature se koi relation nahi).
Isliye ise ―Naïve‖ bolte hain.

⭐Example: Email Spam Detection

Suppose ek email me words aate hain: “Free”, “Win”, “Offer”

 P(Spam | Free) high hota hai


 P(Spam | Win) high
 P(Spam | Offer) high

Model multiply karke check karta hai:

P(Spam∣Email)=P(Free∣Spam)×P(Win∣Spam)×...P(\text{Spam} | \text{Email}) = P(Free|Spam) \times


P(Win|Spam) \times ...P(Spam∣Email)=P(Free∣Spam)×P(Win∣Spam)×...

Jis class ka probability max hota hai → wahi output.

⭐Where Naïve Bayes Use Hotata Hai?

 Spam detection
 Sentiment analysis
 Text classification
 News category prediction

⭐Benefits:

 Very fast
 Works best for text data
 Requires small training data

⭐ 3. Logistic Regression – Hinglish


Explanation
Ye ek classification algorithm hai (mostly binary classification).
Name regression hai but use classification ke liye hota hai.

⭐Why Called Logistic?

Because model sigmoid function use karta hai:

σ(x)=11+e−x\sigma(x) = \frac{1}{1 + e^{-x}}σ(x)=1+e−x1

Ye 0–1 ke beech probability deta hai.

⭐Example:

Spam email → Yes (1) / No (0)


Diabetes prediction → Yes / No
Pass/Fail prediction

⭐How Logistic Regression Works?

1. Input features ka linear combination banate hain:

z=w1x1+w2x2+bz = w_1x_1 + w_2x_2 + bz=w1x1+w2x2+b

2. Sigmoid function apply karte hain → Probability milti hai


3. Agar probability > 0.5 → Class 1
4. Else → Class 0
⭐Example:

Suppose hum diabetic prediction kar rahe hain.

Input features:

 Age
 Glucose level

Logistic Regression probability calculate karega:

P(Diabetes=1)P(Diabetes = 1)P(Diabetes=1)

Agar probability 0.78 aayi → ―Diabetic‖


0.23 aayi → ―Not Diabetic‖

⭐ 4. Feature Engineering – Hinglish


Explanation
Feature Engineering ka matlab hota hai:
Raw data ko useful features me convert karna.

Why?

Kyuki machine learning ka performance data ke quality pe depend karta hai.

⭐Types of Feature Engineering:

⭐(1) Handling Missing Values

 Fill with mean/median


 Drop rows/columns

⭐(2) Encoding Categorical Variables

 One-hot encoding
 Label encoding

⭐(3) Scaling/Normalization
 StandardScaler
 Min-Max Scaler

⭐(4) Creating New Features

Example:
Date →

 Day
 Month
 Year
 Weekday

⭐(5) Binning

Continuous values ko categories me convert karna


Example:
Age → Child/Adult/Senior

⭐(6) Text Feature Engineering

 Bag of Words
 TF-IDF
 Word embeddings

⭐ Example: House Price Prediction


Raw data:

 ―Area = 1200 sq ft‖


 ―Price = 50 lakh‖
 ―Location = Mumbai‖

We create new features:

 Price per sq ft = 50 lakh / 1200


 City encoding
 Age of building
 Distance from main road

Better features → better accuracy.


⭐ 5. Feature Selection – Hinglish
Explanation
Feature selection ka matlab:
Important features select karna and useless features remove karna.

Why Feature Selection?

 Improve model accuracy


 Reduce overfitting
 Faster training
 Less memory use

⭐Methods of Feature Selection

⭐(1) Filter Methods

 Correlation
 Chi-square test
 ANOVA test

Example:

Agar income and spending score highly correlated → keep one, remove the other

⭐(2) Wrapper Methods

 Forward Selection
 Backward Elimination
 Recursive Feature Elimination (RFE)

Example:
RFE top 10 best features select karega.

⭐(3) Embedded Methods

 LASSO regularization (L1)


 Decision Tree feature importance

Example:
Decision tree batata hai kaunse features important hain (like glucose level).

⭐ Simple Example of Feature Selection:


Spam detection me thousands of words hote hain.
Feature selection choose karega:

Only those words that strongly indicate spam


―Win‖, ―Prize‖, ―Free‖, ―Buy Now‖

Baaki thousand rare words remove kar deta hai.

⭐ Summary (Short for Viva)


Topic Short Viva Answer (Hinglish)

Probability Kisi event ke hone ke chance; ML probability se predictions banata hai.

Naïve Bayes Probability-based classifier; feature independence assume karta hai; best for text.

Logistic Regression Binary classifier using sigmoid; output probability deta hai.

Feature Engineering Raw data ko useful features me convert karna.

Feature Selection Important features choose karna to reduce overfitting & increase accuracy.

⭐1. Clustering (Grouping of Similar Data)


Clustering ka matlab hota hai similar data points ko ek group (cluster) me rakhna bina kisi
label ke.
This is unsupervised learning.
⭐ a) K-Means Clustering (Most Popular
Clustering Algorithm)
⭐How it works?

1. kcluster choose karo (example: k = 3)


2. Randomly 3 centers (centroids) select hotay hain
3. Har point nearest centroid choose karta hai
4. New centroid recompute hotte hain
5. Repeat until stable ho jaye

⭐Example (Hinglish):

Suppose ek mall customer segmentation karna chahta hai.

Data:

 Income
 Spending score

K-means 3 groups bana dega:

 Cluster 1 → Low income, low spenders


 Cluster 2 → High income, high spenders
 Cluster 3 → Middle group

Marketing team har cluster ko different offers de sakti hai.

⭐ b) Hierarchical Clustering (Tree-type


Clustering)
Yeh ek tree structure (dendrogram) banata hai.

Types:

1. Agglomerative (Bottom-up)
Sabse common method
o Har point apna cluster
o
Nearest clusters merge hote jaate hain
2. Divisive (Top-down)
Reverse process
o Sab ek cluster
o Split hote jaate hain

⭐Example:

Genes ko similarities ke basis pe tree form me represent karna.

Dendrogram se easily pata lagta hai kaun genes similar hain.

⭐ 2. Dimensionality Reduction (PCA & SVD)


High-dimensional data → slow, complex, noisy.
Dimensionality reduction important features ko preserve karke dimensions ko reduce karta hai.

⭐ a) PCA (Principal Component Analysis)


PCA data ko new directions (principal components) ke along transform karta hai.

Key idea:

 Direction of maximum variance choose karo


 Lower dimensions me data compress ho jata hai
 Information loss kam hota hai

⭐Example:

Suppose dataset me 100 features hain.


PCA 100 → 10 features me convert kar deta hai with 90% information retained.

Use cases:

 Face recognition
 Data visualization (2D, 3D)
 Noise removal

⭐ b) SVD (Singular Value Decomposition)


Matrix ko 3 matrices me split karta hai:

A=UΣVTA = U \Sigma V^TA=UΣVT

Used in:

 Text mining
 Recommender systems
 Latent Semantic Analysis (LSA)

⭐Example:

SVD Netflix movies recommendation me use hota hai


→ hidden patterns (latent factors) identify karta hai
Example:

 Users who like action also like thriller


 SVD finds these patterns mathematically

⭐ 3. Text Mining & Information Retrieval


Text Mining = Text data se useful information extract karna.
IR (Information Retrieval) = Query ke basis pe relevant documents return karna.

⭐Text Mining Tasks

 Tokenization (sentence → words)


 Stopword removal (like: the, is, a)
 Stemming / Lemmatization
 TF-IDF, Bag of Words
 Sentiment analysis
 Text classification
⭐Example:

Customer review:
―I love this phone, battery life is excellent.‖

Model identifies:

 Sentiment = Positive
 Keywords = love, battery, excellent

⭐Information Retrieval (IR) Example

Google search engine

Query: "Nearest restaurants‖


IR system:

 Index search
 Rank documents
 Show top results

Algorithms used:

 TF-IDF
 PageRank
 BM25

⭐ 4. Network Analysis
Network = Nodes + Edges
Example:

 Social networks (Facebook, Instagram)


 Road networks
 Biological networks (proteins)
⭐Concepts:

 Degree (connections count)


 Centrality (importance)
 Clustering coefficient
 Communities detection

⭐Example:

Facebook me kaun user most influential hai?


→ Use centrality measure se identify hota hai.

Instagram suggestions:
→ Network similarity + connections se decide hota hai.

⭐ 5. Recommender Systems
Users ko personalized suggestions dene wale algorithms.

Types:

1. Content-based Filtering

Same type ke items recommend karta hai.

Example:
Tum comedy movies dekhte ho → system aur comedy movies suggest karega.

2. Collaborative Filtering

―Users like you also liked…‖


Common taste ke basis pe recommendation.

Example:
Agar tum aur X same movies pasand karte ho, aur X ne movie ―Y‖ like ki →
Tumhe ―Y‖ recommend hogi.
3. Hybrid Systems

Content-based + Collaborative mix.

Example:
Netflix, YouTube, Amazon uses hybrid systems.

⭐ 6. Relational Databases & SQL


Relational database data ko tables (rows + columns) me store karta hai.

Examples:
MySQL, PostgreSQL, Oracle, SQL Server

SQL Commands:

 SELECT
 INSERT
 UPDATE
 DELETE
 JOIN
 ORDER BY/GROUP BY

⭐Example:

Find all students:

SELECT * FROM students;

Find average marks:

SELECT AVG(marks) FROM students;

⭐ 7. NoSQL Databases (Non-relational)


NoSQL = ―Not Only SQL‖
Flexible, scalable databases
Used for big data, real-time apps.
Types:

 Document DB → MongoDB
 Key-Value DB → Redis
 Column DB → Cassandra
 Graph DB → Neo4j

⭐Example:

MongoDB store:

{
"name": "Bharat",
"age": 21,
"skills": ["ML", "DSA"]
}

⭐ 8. Graph Database (Graph DB)


Data nodes and edges ke form me stored hota hai.

Best for:

 Social networks
 Fraud detection
 Recommendations

Example (Neo4j):
User —[KNOWS]→ User
Movie —[LIKED_BY]→ User

⭐ 9. Big Data Distributed Computing


Large datasets ko process karna multiple machines par.

⭐ a) MapReduce
Google ka framework.
2 steps:

1. Map → Data ko small chunks me process


2. Reduce → Result combine

⭐Example:

Word count program:

 Map: Each word = 1


 Reduce: Count sum

⭐ b) Spark RDD (Resilient Distributed


Datasets)
Spark RDD distributed collections hain jo memory me process hote hain → fast.

Benefits:

 In-memory processing
 Fault tolerant
 Fast compared to MapReduce

⭐Example:

RDD operations:

rdd = [Link]("[Link]")
words = [Link](lambda x: [Link](" "))
count = [Link]()

⭐ALL TOPICS SUMMARY (Short for Viva)


Topic Short Hinglish Answer

K-means Similar points ko k clusters me divide karta hai


Topic Short Hinglish Answer

Hierarchical Dendrogram tree banata hai, merge/split clusters

PCA Variance max direction choose karke dimensions reduce karta hai

SVD Matrix ko U, Σ, Vᵀ me break karta hai; text & recommendation me useful

Text Mining Text se info extract: TF-IDF, sentiment

IR Search system: Google-like retrieval

Network Analysis Nodes & edges analysis—social networks

Recommender Netflix/YouTube suggestions

SQL Table-based database, queries likhne ke liye

NoSQL Flexible DB (MongoDB, Redis)

Graph DB Nodes + edges for relationships

MapReduce Map + Reduce, big data processing

Spark RDD Fast in-memory distributed computing

You might also like