تفسير التنبؤ باستخدام نموذج الانحدار الخطي - كتاب الذكاء الإصطناعي - الصف 12 - الفصل 1 - المملكة العربية السعودية

الكتاب: كتاب الذكاء الإصطناعي - الصف 12 - الفصل 1 | المادة: الذكاء الإصطناعي | المرحلة: الصف 12 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

الدرس: الخصائص العشرة الأكثر تأثيراً في التنبؤ

📚 معلومات الصفحة

الكتاب: كتاب الذكاء الإصطناعي - الصف 12 - الفصل 1 | المادة: الذكاء الإصطناعي | المرحلة: الصف 12 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

نوع المحتوى: example

مستوى الصعوبة: متوسط

📝 ملخص الصفحة

تقدم هذه الصفحة شرحاً مفصلاً لكيفية تفسير تنبؤات نموذج التعلم الآلي باستخدام نموذج الانحدار الخطي البسيط. يتم عرض الكلمات العشرة الأكثر تأثيراً في التنبؤ مع معاملاتها، حيث تمثل المعاملات السلبية تأثيراً سلبياً على التنبؤ الإيجابي، بينما تمثل المعاملات الإيجابية تأثيراً إيجابياً.

يتم توضيح أن الكلمات 'terrible' و'horrible' و'boring' لها أقوى تأثير سلبي على التنبؤ، بينما كلمة 'very' فقط لها تأثير إيجابي طفيف. توفر الصفحة أيضاً تصوراً مرئياً على شكل مخطط شريطي يوضح تأثير كل كلمة بوضوح.

يهدف هذا المحتوى إلى مساعدة الطلاب على فهم كيفية عمل نماذج التفسير في التعلم الآلي، وكيف يمكن تحليل تأثير الميزات المختلفة (الكلمات في هذه الحالة) على نتائج التنبؤ. يتم التركيز على الجانب العملي من خلال تقديم أمثلة ملموسة وتصورات بيانية.

📋 المحتوى المنظم

📖 محتوى تعليمي مفصّل

نوع: محتوى تعليمي

كما هو متوقع، يقدم نموذج التنبؤ سلبياً مؤكداً بدرجة كبيرة في هذا المثال البسيط.

نوع: محتوى تعليمي

# explain the prediction for this example. exp = explainer_v1.explain_instance(easy_example.lower(), prediction_pipeline_v1.predict_proba, num_features=10)

نوع: محتوى تعليمي

# print the words with the strongest influence on the prediction. exp.as_list()

نوع: محتوى تعليمي

[('terrible', -0.07046118794796816), ('horrible', -0.06841672591649835), ('boring', -0.05909016205135171), ('plot', -0.024063095577996376), ('was', -0.01443607162474861), ('movie', -0.011956911011210977), ('actors', -0.011682594571408675), ('this', -0.009712387273986628), ('very', 0.008956707731803237), ('were', -0.008897098392433257)]

الخصائص العشرة الأكثر تأثيراً.

نوع: محتوى تعليمي

الخصائص العشرة الأكثر تأثيراً.

الدرجة المقابلة لكل كلمة تمثل معاملًا في نموذج الانحدار الخطي البسيط المستخدم لتقديم التفسير.

نوع: محتوى تعليمي

الدرجة المقابلة لكل كلمة تمثل معاملًا في نموذج الانحدار الخطي البسيط المستخدم لتقديم التفسير.

نوع: محتوى تعليمي

يمكن الحصول على تصور مرئي أكثر دقة على النحو التالي:

نوع: محتوى تعليمي

# visualize the impact of the most influential words. fig = exp.as_pyplot_figure()

نوع: FIGURE_REFERENCE

شكل 3.9: الكلمات الأعلى تأثيراً في القيام بالتنبؤات

نوع: METADATA

وزارة التعليم 143 Ministry of Education 2025 - 1447

🔍 عناصر مرئية

Local explanation for class pos

Horizontal bar chart showing the local explanation for a positive class prediction. It illustrates the influence (coefficient) of different words on the prediction. Words with negative coefficients (red bars) decrease the likelihood of a positive prediction, while words with positive coefficients (green bars) increase it.

📄 النص الكامل للصفحة

كما هو متوقع، يقدم نموذج التنبؤ سلبياً مؤكداً بدرجة كبيرة في هذا المثال البسيط.# explain the prediction for this example. exp = explainer_v1.explain_instance(easy_example.lower(), prediction_pipeline_v1.predict_proba, num_features=10)# print the words with the strongest influence on the prediction. exp.as_list()[('terrible', -0.07046118794796816), ('horrible', -0.06841672591649835), ('boring', -0.05909016205135171), ('plot', -0.024063095577996376), ('was', -0.01443607162474861), ('movie', -0.011956911011210977), ('actors', -0.011682594571408675), ('this', -0.009712387273986628), ('very', 0.008956707731803237), ('were', -0.008897098392433257)]--- SECTION: الخصائص العشرة الأكثر تأثيراً. --- الخصائص العشرة الأكثر تأثيراً.--- SECTION: الدرجة المقابلة لكل كلمة تمثل معاملًا في نموذج الانحدار الخطي البسيط المستخدم لتقديم التفسير. --- الدرجة المقابلة لكل كلمة تمثل معاملًا في نموذج الانحدار الخطي البسيط المستخدم لتقديم التفسير.يمكن الحصول على تصور مرئي أكثر دقة على النحو التالي:# visualize the impact of the most influential words. fig = exp.as_pyplot_figure()شكل 3.9: الكلمات الأعلى تأثيراً في القيام بالتنبؤات2025 - 1447--- VISUAL CONTEXT --- **BAR_CHART**: Local explanation for class pos Description: Horizontal bar chart showing the local explanation for a positive class prediction. It illustrates the influence (coefficient) of different words on the prediction. Words with negative coefficients (red bars) decrease the likelihood of a positive prediction, while words with positive coefficients (green bars) increase it. X-axis: Coefficient Y-axis: Word Data: The chart displays 10 words and their corresponding coefficients. 'terrible', 'horrible', and 'boring' have the strongest negative influence. 'very' is the only word with a positive influence, albeit small. The remaining words ('plot', 'was', 'movie', 'actors', 'this', 'were') have varying degrees of negative influence. Key Values: terrible: -0.07046118794796816, horrible: -0.06841672591649835, boring: -0.05909016205135171, plot: -0.024063095577996376, was: -0.01443607162474861, movie: -0.011956911011210977, actors: -0.011682594571408675, this: -0.009712387273986628, very: 0.008956707731803237, were: -0.008897098392433257 Context: This bar chart visually represents the local explanation of a model's prediction, showing which words contribute positively or negatively to the classification of a text as 'positive'. It helps in understanding the model's decision-making process for a specific instance by highlighting the most influential features (words).