38. Machine Learning मध्ये Overfitting आणि Underfitting
38.3 साध्या Fixes
का गरजेचे आहे. समस्या नावाने ओळखल्यानंतर fancy theory आधी साध्या fixes लागू करा.
हे काय आहे. सामान्य fixes: जास्त clean rows; कमी / चांगल्या features; सोपे model (shallower tree, सुरूवातीला कमी forest trees); regularisation नंतर; नेहमी खरे holdout test set ठेवा.
कसे करायचे.
Beginners साठी fix मेनू
- Overfit? Tree depth कमी करा; data जोडा; leaky किंवा noisy columns काढा.
- Underfit? उपयुक्त features जोडा; थोडे श्रीमंत model परवानगी द्या; signal काढला नाही ना ते तपासा.
- नेहमी: कधीही train न केलेल्या test rows वर evaluate करा.
# Same API, simpler hypothesis
safer_tree = DecisionTreeClassifier(max_depth=3, min_samples_leaf=2, random_state=0)
Ravindra Bagale's Tip
Start with a simple model and a clean train-test split. Add more complex models only later, after the simple one works and you know where it falls short.
Ravindra Bagale's Tip – मराठी
आधी एक साधं model आणि clean train-test split वापरून सुरुवात करा. साधं model नीट चाललं आणि ते कुठे कमी पडतं हे कळलं, त्यानंतरच जास्त complex models वापरा.
Ravindra Bagale's Tip – हिंदी
पहले एक सादा model और clean train-test split से शुरुआत करो. सादा model ठीक से चल जाए और पता चल जाए कि वह कहाँ कम पड़ता है, उसके बाद ही ज़्यादा complex models इस्तेमाल करो.