Free tutorials & notes in Hindi & English · Clean code examples 🧰 मुफ़्त PDF और फ़ोटो टूल्स →
📘 Lesson  ·  Lesson 57

Overfitting & Underfitting

Fitting की समस्या

जब आप machine learning model train करते हैं, दो चीज़ें गलत हो सकती हैं: यह बहुत कम या बहुत ज़्यादा सीख सकता है। बहुत कम सीखना underfitting है; बहुत ज़्यादा सीखना (noise समेत) overfitting है। लक्ष्य अच्छा संतुलन है — ऐसा model जो असली patterns सीखे और नए data पर अच्छा चले।

💡 Underfit = बहुत सरल, patterns चूकता है। Overfit = बहुत complex, noise रटता है। Good fit = बिल्कुल सही।

Underfitting

Underfitting model data में क्या हो रहा है यह पकड़ने के लिए बहुत सरल होता है।

  • संकेत: training और test दोनों data पर बुरी accuracy।
  • कारण: model या features बहुत बुनियादी हैं, या training बहुत छोटी थी।
  • उपमा: ऐसा student जिसने मुश्किल से पढ़ा — वो practice और असली exam दोनों में बुरा करता है।

Overfitting

Overfitting model training data को बहुत ज़्यादा सीख लेता है, random noise समेत।

  • संकेत: बहुत ऊँची training accuracy पर बहुत कम test accuracy।
  • कारण: model बहुत complex है, या training data बहुत कम है।
  • उपमा: ऐसा student जिसने practice questions रट लिए — उन पर बढ़िया, नए पर खोया हुआ।

कैसे पहचानें

training data बनाम नए (test) data पर performance की तुलना कीजिए:

  • दोनों कम → underfitting।
  • Training ऊँची, test कम → overfitting।
  • दोनों ऊँची और पास → good fit।

Training और test accuracy के बीच यह फ़र्क मुख्य सुराग़ है कि आपको कौन-सी समस्या है।

कैसे ठीक करें

Underfitting ठीक करें:

  • ज़्यादा complex model इस्तेमाल कीजिए।
  • और उपयोगी features जोड़िए।
  • ज़्यादा देर train कीजिए; regularisation कम कीजिए।

Overfitting ठीक करें:

  • ज़्यादा training data लीजिए।
  • Model सरल कीजिए; regularisation जोड़िए।
  • Dropout इस्तेमाल कीजिए (neural nets); training जल्दी रोकिए।

तुलना

बातUnderfittingOverfitting
Modelबहुत सरलबहुत complex
Training accuracyकमऊँची
Test accuracyकमकम
ठीकComplexity जोड़ेंसरल / ज़्यादा data

आम भ्रम

  • सिर्फ़ training accuracy पर आँकना। हमेशा test/नए data भी जाँचिए, वरना overfitting चूक जाते हैं।
  • यह सोचना ज़्यादा complex हमेशा बेहतर। बहुत complex overfitting करता है।
  • Underfitting ठीक करने को data जोड़ना। ज़्यादा data overfitting में मदद करता है; underfitting को ज़्यादा model capacity चाहिए।
  • Train-test gap अनदेखा करना। वो gap आपका मुख्य diagnostic tool है।

सारांश

  • Underfitting: model बहुत सरल, training और test दोनों data पर बुरा।
  • Overfitting: model बहुत complex, training पर बढ़िया पर नए data पर बुरा।
  • Training बनाम test accuracy की तुलना करके पहचानिए।
  • Underfitting को ज़्यादा complexity से; overfitting को ज़्यादा data या सरल models से ठीक कीजिए।
  • ऐसा good fit चाहिए जो नए data पर generalise करे।

आगे, ML types समझिए supervised, unsupervised और reinforcement में, या model देखिए spam detection में।

अक्सर पूछे जाने वाले प्रश्न (FAQ)

Machine learning में overfitting क्या है?
Overfitting तब है जब model training data को बहुत ज़्यादा सीख ले — उसके noise और quirks समेत — तो यह training data पर बढ़िया पर नए, अनदेखे data पर बुरा करता है। इसने general patterns सीखने के बजाय रट लिया है।
Underfitting क्या है?
Underfitting तब है जब model data के patterns पकड़ने के लिए बहुत सरल हो, तो यह training और नए दोनों data पर बुरा करता है। इसने काफ़ी नहीं सीखा।
कैसे पता चले मेरा model overfitting कर रहा है?
Training और test accuracy की तुलना कीजिए। अगर training accuracy ऊँची पर test accuracy बहुत कम हो, model overfitting कर रहा है — जो देखा उस पर अच्छा पर नए data पर fail।
Overfitting कैसे ठीक करूँ?
ज़्यादा training data इस्तेमाल कीजिए, model सरल कीजिए, regularisation लगाइए, dropout इस्तेमाल कीजिए (neural networks को), या training जल्दी रोकिए। ये model को noise रटने से रोकते हैं।
Underfitting कैसे ठीक करूँ?
Model को ज़्यादा complex बनाइए, और उपयोगी features जोड़िए, ज़्यादा देर train कीजिए, या regularisation कम कीजिए। Underfitting मतलब model को patterns सीखने को ज़्यादा capacity चाहिए।
← Back to Python Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

अगला topicActivation Functions आपकी प्रगति: 57 / 66 (86%) · Lesson 58 / 66 आगे बढ़ें →

यह lesson कैसा लगा?

आपकी राय से हम content और बेहतर बनाते हैं।

अपना review और सुझाव लिखें (वैकल्पिक)

Review approve होने के बाद आपका नाम और शहर इसके साथ public दिख सकते हैं। Email या phone न लिखें।

▶ CodingEasily on YouTube

Video से सीखें – आसान Hindi में

चुनी हुई video: RDBMS भाग 3 – Class XI Commerce IT

▶ Channel subscribe करें