0Pricing
Data Science Academy · درس

لماذا نحتفظ بمجموعة اختبار منفصلة

تقدير الأداء على بيانات لم تُرَ من قبل

لماذا نحتفظ بمجموعة اختبار منفصلة درس مجاني في Data Science Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Data Science Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Data Science Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

The Real Question

A model that memorizes your data looks brilliant on it. The real question is how it does on data it has never seen.

Hold Some Data Back

So you set aside part of your data and never train on it. This locked-away slice is your test set, kept for the very end.

Train Here, Judge There

The model learns only from the training set. You then judge it on the untouched test set to see how it truly generalizes. 🎯

Why Not Score on Training

Scoring on the same rows it learned from is like grading a test with the answer key open. That number flatters the model and overstates its skill.

Generalization Is the Goal

You do not care how well it fits old data. You care about generalization: making good predictions on tomorrow's fresh, unseen rows.

Meet Overfitting

When a model nails training data but flops on the test set, it is overfitting. It memorized noise instead of learning the real pattern.

A Common Split

A simple, popular choice is to train on about 80% of rows and test on the remaining 20%. More data to learn, enough left to judge fairly.

Touch It Only Once

The test set is sacred. If you keep peeking and tweaking until the score looks good, you have quietly leaked it into your decisions.

Where the Split Happens

In scikit-learn, one helper does the splitting for you. It shuffles and carves your data into train and test parts in a single call.

from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

The Honest Number

The score on the test set is your honest estimate of real-world performance. Trust it more than any glowing training score.

More Than a Formality

Holding out data is not red tape. It is the one habit that stops you from shipping a model that only ever worked on paper.

Quick Check

Why do you keep a separate test set?

Recap

You split data, learn on the train part, and judge on a sacred test set. That untouched slice is your honest read on real-world skill. 🎯

الأسئلة الشائعة

هل درس «لماذا نحتفظ بمجموعة اختبار منفصلة» مجاني؟

نعم — نص درس «لماذا نحتفظ بمجموعة اختبار منفصلة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Data Science Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Data Science Academy 4 دروس في المجموع.

ماذا ستتعلم في «لماذا نحتفظ بمجموعة اختبار منفصلة»؟

تقدير الأداء على بيانات لم تُرَ من قبل تتمرن على Data Science Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Data Science Academy؟

لا تُشترط خبرة سابقة. Data Science Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.

كم من الوقت يستغرق درس «لماذا نحتفظ بمجموعة اختبار منفصلة»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Data Science Academy هذا؟

نعم. كل درس في Data Science Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. لماذا نحتفظ بمجموعة اختبار منفصلة
  2. استخدام train_test_split بالشكل الصحيح
  3. التحقق المتقاطع K-Fold
  4. أوقف تسرّب البيانات قبل أن يبدأ
← العودة إلى Data Science Academy