29. Machine Learning म्हणजे काय (सोपी व्याख्या)
29.4 ML आधी तुम्हाला काय हवे
का. गोंधळलेल्या table वर ML म्हणजे घाणेरड्या stove वर स्वयंपाक. Chapters 9–12 मध्ये तुम्ही data आधीच clean केले. तेच काम ML चे खरे प्रवेशद्वार आहे.
काय. ML आधी हवे: (1) clean rectangular table, (2) supervised असल्यास स्पष्ट label, (3) आधीच्या chapters मधील Python + pandas skills, (4) एका वाक्यात प्रामाणिक प्रश्न.
कसे.
Pre-ML checklist
- एक row = एक case (grain). उदाहरण: प्रत्येक row वर एक Blinkit order — monthly totals मिसळू नका.
- Columns चे dtypes स्पष्ट असावेत (numbers म्हणजे numbers, dates म्हणजे dates).
- Missing values मुद्दाम हाताळा (fill, drop, किंवा flag) — दुर्लक्ष करू नका.
- Supervised साठी: label column असावा आणि प्रत्येक row साठी एकसारखा अर्थ असावा.
- तुम्ही म्हणू शकता: “मी ___ मधून ___ predict करू इच्छितो.”
import pandas as pd
# Tiny clean table ready for later ML (fictional Maharashtra deliveries)
df = pd.DataFrame({
"order_id": ["BLK-001", "BLK-002", "BLK-003", "BLK-004"],
"city": ["Pune", "Solapur", "Pune", "Nashik"],
"items": [3, 5, 2, 6],
"distance_km": [2.1, 8.4, 1.2, 4.0],
"was_late": [0, 1, 0, 1],
})
assert df["order_id"].is_unique
assert df["was_late"].isin([0, 1]).all()
print(df.dtypes)
print("Ready idea: predict was_late from items + distance_km + city (later chapters).")
तुम्हाला काय दिसायला हवे. स्थिर dtypes आणि स्पष्ट 0/1 label. अजून model fit नाही — फक्त तयारी.
Ravindra Bagale's Tip
Many students import sklearn right away and skip cleaning the data. First, clean your table the way you learned in Chapter 9. Only after that should you start machine learning. Remember this order: clean data first, then the model.
Ravindra Bagale's Tip – मराठी
खूप students लगेच sklearn import करतात आणि data cleaning सोडून देतात. आधी Chapter 9 मध्ये शिकल्याप्रमाणे तुमची table clean करा. त्यानंतरच machine learning सुरू करा. हा क्रम लक्षात ठेवा: आधी clean data, मग model.
Ravindra Bagale's Tip – हिंदी
बहुत से students तुरंत sklearn import कर लेते हैं और data cleaning छोड़ देते हैं. पहले Chapter 9 में सीखे तरीके से अपनी table clean करो. उसके बाद ही machine learning शुरू करो. यह क्रम याद रखो: पहले clean data, फिर model.