AI Tutorial - Machine Learning Basics
🎓 Machine Learning Kya Hai?
🌟 Real Life Mein:
Netflix kaise jaanta hai kaunsi movie pasand aayegi?
📺 Tum action movies dekhte ho → ML note karta hai
⭐ 5-star dete ho superhero films ko → Pattern mila!
🎬 Agli baar action/superhero suggest → ML prediction!
Ye hai Machine Learning!
🤖 ML vs Traditional Programming
Difference
| Traditional Programming | Machine Learning |
|---|---|
| Rules likho → Output milta hai | Data do → AI khud rules banata hai! |
| If-else statements | Pattern recognition |
| Example: Calculator | Example: Face Recognition |
📊 ML Ke Types
1. Supervised Learning (Teacher hai)
✅ Labelled data - Answer pata hai
Example: Email spam ya not spam?
- Input: Email text
- Label: "Spam" ya "Not Spam"
- AI seekhta hai patterns
2. Unsupervised Learning (Teacher nahi)
❌ No labels - AI khud groups banata hai
Example: Customer groups
- Young shoppers
- Budget buyers
- Premium customers
Simple trick: Teacher hai? Supervised. Khud seekho? Unsupervised!
Example
# Simple prediction
from sklearn import tree
model = tree.DecisionTreeClassifier()
# Train and predict