Ravindra BagaleCourses & study guides English Track your progress

29. Machine Learning म्हणजे काय (सोपी व्याख्या)

Data Science

29.3 Supervised vs Unsupervised Learning (सोप्या भाषेत)

का. sklearn ची कोणतीही ओळ लिण्यापूर्वी, तुमच्या table मध्ये आधीच answer column आहे की नाही हे माहित हवे. हाच supervised vs unsupervised चा निर्णय.

काय.

  • Supervised learning — प्रत्येक training row ला label (उत्तर) असते. उदाहरण: past orders मध्ये column was_late = 0 किंवा 1. Model नवीन orders साठी was_late अंदाज करायला शिकतो.
  • Unsupervised learning — answer column नसतो. Model groups किंवा structure शोधतो. उदाहरण: आधीच लिहिलेल्या group नावाशिवाय customers ला “busy weekday” vs “festival shopper” मध्ये cluster करा.

कसे.

एका मिनिटात problem ओळखा

  1. तुमची clean table पाहा. नंतर अंदाज करायची गोष्ट असलेला column आहे का?
  2. असल्यास → supervised (नंतर: numbers साठी regression, categories साठी classification).
  3. नसेल आणि नैसर्गिक groups हवे असतील → unsupervised (नंतर: clustering).
  4. Coding आधी कागदावर label चे नाव लिहा. रिकामे label नाव = थांबा.
import pandas as pd

# Supervised-ready (fictional): label = was_late
orders = pd.DataFrame({
 "city": ["Pune", "Solapur", "Nashik", "Kolhapur"],
 "items": [4, 2, 8, 3],
 "rain_mm": [0, 12, 0, 3],
 "was_late": [0, 1, 0, 0], # label we already know for PAST rows
})
print("Supervised label column:", "was_late" in orders.columns)

# Unsupervised-ready: no label — only features
customers = pd.DataFrame({
 "city": ["Pune", "Pune", "Nagpur", "Nagpur"],
 "orders_30d": [12, 2, 9, 1],
 "avg_basket_inr": [220, 90, 180, 70],
})
print(customers)
print("No answer column — clustering could group these later.")

तुम्हाला काय दिसायला हवे. पहिल्या table मध्ये was_late आहे. दुसऱ्यामध्ये नाही. फक्त ही एक गोष्ट learning type ठरवते.

Ravindra Bagale's Tip

If an interviewer asks, “What is supervised learning?”, answer in one simple line. Say: “The past rows already have an answer column, and the model learns to guess that answer for new rows.” A short and clear answer like this shows that you really understand the idea.