Machine learning and AI basics course
मशीन लर्निंग और AI कोर्स (हिंदी + English)
Understand the ideas behind machine learning with small, friendly datasets: what AI and data are, features (X) and labels (y), linear regression, decision trees, k-nearest neighbours, sentiment analysis, a tiny neural network and prompt writing for generative AI. The Pro chapters test models honestly with a train/test split and accuracy, write a nearest-neighbour model in plain Python, and build a spam detector while discussing responsible AI.
छोटे और आसान datasets से machine learning के मूल विचार समझो: AI और data क्या हैं, features (X) और labels (y), linear regression, decision trees, k-nearest neighbours, sentiment analysis, छोटा neural network और generative AI के लिए prompt लिखना। Pro चैप्टर्स में train/test split और accuracy से model की ईमानदार जाँच, plain Python में nearest-neighbour model, और responsible AI के साथ एक spam detector बनता है।
- 11 chapters in four levels: Start, Basic, Intermediate and Pro
- 11 practice problems with automatic checks and hints
- a quiz question in every chapter, plus 9 viva and interview questions
- free, no sign-up; works on a phone or a computer
How the code runs: The lessons use small built-in versions of a few scikit-learn tools (LinearRegression, DecisionTreeClassifier, KNeighborsClassifier, train_test_split, accuracy_score) plus teaching helpers. The generative AI chapter uses a simulated assistant, not a real AI model. For real datasets, use Python with scikit-learn, for example in Google Colab. Lessons में scikit-learn के कुछ tools (LinearRegression, DecisionTreeClassifier, KNeighborsClassifier, train_test_split, accuracy_score) के छोटे built-in रूप और कुछ teaching helpers इस्तेमाल होते हैं। Generative AI वाले चैप्टर का assistant एक simulation है, असली AI model नहीं। असली datasets के लिए scikit-learn वाला Python इस्तेमाल करें, जैसे Google Colab में।
Start Here level
- 4.0Start Here: What is AI? (Data + Your First Prediction)
Normal coding: humans write the rules. Machine Learning: the computer learns rules from data (examples).
Basic level
- 4.1What is Machine Learning? (Features X & Labels y)
ML = the computer learns the rule from examples instead of us writing it.
- 4.2Linear Regression (Study Hours vs Exam Marks Predictor!)
Linear Regression predicts a number by drawing the best straight line
y = m*x + c. - 4.3Decision Trees (Cricket Match Win Predictor! )
Classification = choosing a category (Win/Lose, Spam/Not spam).
Intermediate level
- 4.4K-Nearest Neighbors / KNN ("Jaise Dost, Waisa Aap!")
KNN looks at the
knearest known points and takes a majority vote. - 4.5NLP Sentiment Analysis (Detect Human Mood from Text!)
NLP = teaching computers to read human language.
- 4.6Neural Networks & Deep Learning (Build an AI Brain! )
A neural network has input, hidden and output layers of "neurons".
- 4.7Bonus: Generative AI & Prompt Engineering (LLM Lab)
Generative AI (LLMs like Gemini) writes new text, code and plans.
Pro level
- 4.8Train/Test Split + Accuracy (Test Your AI Honestly)
train_test_split(X, y, test_size=0.25, random_state=42)keeps 25% of the data hidden for the final test. - 4.9ML From Scratch in Pure Python (Distance, Nearest Neighbour, Cleaning & Scaling)
Clean first:
[r for r in rows if None not in r]drops rows with missing values. - 4.10Capstone: Spam Detector End-to-End + Responsible AI + Next Steps
End-to-end ML = data → clean → train → predict → evaluate on new data.
Practice problems
Each problem is linked to a chapter. Read them on the practice page and solve them in the Practice Zone.
- Your First "Model": Predict Tomorrow's Chai Sales
- Lemon or Coconut? Train Your First AI
- Fix the Marks Predictor (Linear Regression)
- Predict: The Monsoon Decision Tree
- Chai or Lassi? KNN Neighbours (fill the blanks)
- Food App Review Mood Detector (NLP)
- Predict: One Neuron Decides
- Master Prompt: Board Exam Study Plan
- Pass or Fail? Train/Test Split + Accuracy
- Fix the Data Cleaning + Min-Max Scaling
- Mini Project: SMS Spam Detector from Scratch (+ Responsible AI)
Viva and interview questions
How is Machine Learning different from Traditional Programming?
In Traditional Coding, humans write explicit if-else rules. In Machine Learning, we feed historical Data (X) + Answers (y), and the computer discovers the rules/patterns on its own!
साधारण कोडिंग और Machine Learning (AI) में सबसे बड़ा अंतर क्या है?
साधारण कोडिंग में इंसान खुद if-else नियम लिखता है। Machine Learning में हम कंप्यूटर को पुराना डेटा (X) और जवाब (y) देते हैं, और कंप्यूटर पैटर्न खुद सीख लेता है!
What are Features (X) and Labels (y) in Supervised Learning?
Features (X) are the input clues (e.g. study hours, runs & wickets). Labels (y) are the target output answers we train the model to predict (e.g. marks, Win/Lose).
Supervised Learning में Features (X) और Labels (y) क्या होते हैं?
Features (X) वे सुराग/सवाल हैं जिन्हें देखकर अंदाज़ा लगाना है (जैसे पढ़ाई के घंटे), और Labels (y) असली मंज़िल/जवाब हैं (जैसे परीक्षा के नंबर)।
Difference between Regression and Classification with examples?
Regression predicts a continuous number (house price 75.5 Lakhs, exam score 88). Classification predicts a discrete category (Spam vs Not Spam, Win vs Lose).
उदाहरण सहित Regression और Classification में अंतर बताइए।
Regression कोई लगातार बदलने वाली संख्या बताता है (जैसे घर की कीमत या मार्क्स), जबकि Classification तय श्रेणी चुनता है (जैसे Win/Lose या Apple/Watermelon)।
What are the 3 layers of an Artificial Neural Network?
1) Input Layer (receives raw features), 2) Hidden Layer(s) (extracts deep patterns via weighted connections), and 3) Output Layer (delivers the final prediction).
Artificial Neural Network (दिमागी AI) की 3 मुख्य परतें कौन-सी हैं?
1) Input Layer (कच्चा डेटा लेती है), 2) Hidden Layer (बीच में गहराई से पैटर्न सोचती है), और 3) Output Layer (अंतिम फ़ैसला सुनाती है)।
Where do you see NLP (Natural Language Processing) in daily life?
YouTube/Instagram toxic-comment filters, Google Translate, Siri/Alexa voice assistants, email Spam filters, and customer support chatbots!
हम रोज़मर्रा की ज़िंदगी में NLP का इस्तेमाल कहाँ देखते हैं?
Google Translate, YouTube कमेंट मूड फ़िल्टर, Alexa/Google Assistant और ईमेल स्पैम फ़िल्टर — ये सब NLP के उदाहरण हैं!
What is Prompt Engineering in Generative AI?
Designing clear, structured instructions (Persona/Role + Context + Task + Output Format) so Large Language Models (LLMs) produce accurate, reliable results.
Generative AI में Prompt Engineering किसे कहते हैं?
AI मॉडल (जैसे Gemini/ChatGPT) को सही रोल + संदर्भ + स्पष्ट कार्य + आउटपुट फ़ॉर्मेट देकर सटीक परिणाम निकलवाने की कला को Prompt Engineering कहते हैं।
What is overfitting, and how do you detect it?
Overfitting is when a model memorises the training data and does badly on new data. Keep a test set with train_test_split and compare training accuracy with test accuracy — a big gap means overfitting.
Overfitting क्या है, और इसे कैसे पकड़ते हैं?
जब model training data रट ले और नए data पर ख़राब करे, तो वह overfitting है। train_test_split से एक test set रखो और training accuracy की तुलना test accuracy से करो — बड़ा फ़र्क़ मतलब overfitting।
Why do we scale features before using KNN?
KNN decides by distance. If one feature is in thousands (salary) and another in single digits (rating), the big one decides everything. Min-max scaling (v - min) / (max - min) puts all features on 0–1.
KNN से पहले features को scale क्यों करते हैं?
KNN दूरी से फ़ैसला करता है। अगर एक feature हज़ारों में है (salary) और दूसरा एक अंक में (rating), तो बड़ा वाला ही सब तय कर देता है। Min-max scaling (v - min) / (max - min) सब features को 0–1 पर ले आता है।
Name three risks to check before using an AI system (Responsible AI).
Bias — unfair or one-sided data gives unfair results. Privacy — never use personal data without consent. Hallucination — generative AI can invent facts, so verify important answers.
किसी AI system को इस्तेमाल करने से पहले कौन-से तीन ख़तरे जाँचने चाहिए (Responsible AI)?
Bias — अनुचित या एकतरफ़ा data से अनुचित नतीजे आते हैं। Privacy — बिना इजाज़त कभी निजी data इस्तेमाल मत करो। Hallucination — generative AI तथ्य गढ़ सकता है, इसलिए ज़रूरी जवाब जाँचो।
Ready mini projects
- House Price AI Predictor: Train Linear Regression to predict house prices (in Lakhs) from room count!
- T20 Cricket Match Win Predictor AI: Trains a
DecisionTreeClassifieron[Runs, Wickets]with interactive match sliders! - YouTube Hinglish Comment Mood Detector: Trains an NLP Sentiment model on Hinglish comments with a live speedometer needle!
Open them in the Projects section of the classroom to run and change the code.