Ravindra BagaleCourses & study guides English Track your progress

31. Machine Learning मध्ये Train Test Split

Data Science

31.1 Data मागे ठेवणे का महत्त्वाचे आहे

का. Exam paper आधी अभ्यासून तोच paper दिला की marks खोटे ठरतात. Machine learning मध्येही तोच सापळा आहे.

काय. Train set म्हणजे model ला शिकायला मिळणारे rows. Test set म्हणजे शेवटपर्यंत लपवलेले rows — प्रामाणिक performance तपासण्यासाठी. Data मागे ठेवणे म्हणजे training दरम्यान test set न हलवणे.

कसे.

मानसिक चित्र

  1. तुमची clean table shuffle करा (किंवा काळजीपूर्वक split करा).
  2. बहुतेक rows train ला द्या (बहुधा ~80%).
  3. उरलेले test म्हणून lock करा (~20%).
  4. फक्त train वर fit करा. तयार झाल्यावर test वर score करा.

Ravindra Bagale's Tip

Think of the test set as the final exam for your model. Training accuracy is not the honest number to show, because the model has already seen that data. The honest number always comes from the test set.