قراءة مصفوفة الالتباس
اعرف بدقة مواضع أخطاء النموذج
قراءة مصفوفة الالتباس درس مجاني في NLP Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في NLP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة NLP Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
The Whole Picture
The confusion matrix is a small table showing every prediction sorted by what was true and what you guessed. It reveals exactly where errors live.
Rows and Columns
Rows are the true labels and columns are the predicted ones. Each cell counts how many examples fell into that true-versus-predicted combination.
The Four Cells
For two classes you get four counts: true positives, true negatives, and the two error types. Every metric you know is built from these.
True Positive
A true positive is a real positive you correctly flagged, like real spam sent straight to the spam folder. A clean win.
True Negative
A true negative is a real negative you correctly left alone, like a normal email that stays safely in the inbox.
False Positive
A false positive is a false alarm: you flagged something that was actually negative, like a real email wrongly marked as spam.
False Negative
A false negative is a miss: a real positive you let slip through, like spam that lands in the inbox unflagged.
The Diagonal Tells All
Correct predictions sit on the diagonal. A strong model concentrates counts there and leaves the off-diagonal cells nearly empty.
Build It in Python
scikit-learn assembles the matrix from your true and predicted labels in a single call.
from sklearn.metrics import confusion_matrix
cm = confusion_matrix(y_true, y_pred)Make It Readable
A plotted matrix makes errors jump out, so you instantly see which class gets confused for which.
from sklearn.metrics import ConfusionMatrixDisplay
ConfusionMatrixDisplay(cm).plot()Spotting the Weak Spot
Read off-diagonal cells to find the model blind spot. A large false-negative count, for example, warns you that real positives are being missed.
Quick Check
Name the error type from the description.
Recap
The confusion matrix splits results into four cells. The diagonal holds wins; off-diagonal cells expose exactly where your model errs. 🔍
الأسئلة الشائعة
هل درس «قراءة مصفوفة الالتباس» مجاني؟
نعم — نص درس «قراءة مصفوفة الالتباس» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة NLP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة NLP Academy 4 دروس في المجموع.
ماذا ستتعلم في «قراءة مصفوفة الالتباس»؟
اعرف بدقة مواضع أخطاء النموذج تتمرن على NLP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ NLP Academy؟
لا تُشترط خبرة سابقة. NLP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «قراءة مصفوفة الالتباس»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس NLP Academy هذا؟
نعم. كل درس في NLP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- لماذا قد تكون الدقة مضللة
- Precision وRecall وF1
- قراءة مصفوفة الالتباس
- التحقق المتقاطع على النحو الصحيح