Egypt › Secondary › Secondary Two › Programming and AI › Chapter ٧: Machine Learning and AI

Lesson ٧: The Basics of Machine Learning (Item ٧-١)

Secondary TwoProgramming and AISecond Termالدرس ٧٣٠ دقيقة

فيديو الشرح

الفيديو قيد الإنتاج، وسيظهر هنا فور اعتماده.

ماذا ستتعلم؟

اختبر استعدادك أولًا

١. In the question "What is machine learning?" the options are: ١) Programs learning patterns from data instead of being explicitly programmed with rules ٢) Memorizing fixed rules ٣) A kind of printer ٤) File storage. What is the number of the correct answer?
٢. In the question "What is the difference between traditional programming and machine learning?" the options are: ١) No difference ٢) The first uses human-written rules; the second infers rules from examples ٣) Traditional is newer ٤) ML needs no data. What is the number of the correct answer?
٣. In the question "What is supervised learning?" the options are: ١) Learning with no data ٢) Clustering without labels ٣) Training a model on data labeled with correct answers ٤) Manual programming. What is the number of the correct answer?

الشرح خطوة بخطوة

Level ١: We explore together

Lesson topic: The Basics of Machine Learning (Item ٧-١). Machine learning is the branch of AI where programs learn from data instead of explicit rules.

The story: Instead of writing rules to spot spam, we show the model labeled examples and it infers the rules. Supervised learning: training data is labeled with correct answers, like classifying cat and dog photos. Unsupervised learning: unlabeled data in which the model discovers similar groups (clustering). Training adjusts the model parameters to shrink the gap between its predictions and the correct answers. We split data into training and test sets to measure performance on data the model never saw.

أخطاء شائعة وتصحيحها

أمثلة محلولة متدرجة

Easy · مثال ١

Define machine learning in one sentence with an example.

  1. نقرأ السؤال معًا بهدوء.
  2. Data not rules.
الإجابة: Programs inferring patterns from data; like a spam classifier trained on thousands of labeled messages
Easy · مثال ٢

Distinguish supervised from unsupervised learning with an example of each.

  1. نقرأ السؤال معًا بهدوء.
  2. Prior labeling.
الإجابة: Supervised uses labeled data like image classification; unsupervised uses none, like grouping similar customers
Easy · مثال ٣

Why do we need a separate test set?

  1. نقرأ السؤال معًا بهدوء.
  2. Generalization.
الإجابة: To measure performance on data unseen during training, revealing true generalization ability
Medium · مثال ٤

Explain why a model trained on daytime cat photos fails on nighttime cats.

  1. نقرأ السؤال معًا بهدوء.
  2. Data variety.
الإجابة: Training data did not cover real-world variety; the model learned daytime backgrounds, not cat features
Medium · مثال ٥

Describe the steps of building a supervised spam classifier from collection to evaluation.

  1. نقرأ السؤال معًا بهدوء.
  2. Full pipeline.
الإجابة: Collect labeled messages; clean them and convert to numeric features; train the model; measure accuracy on a separate test set; then deploy and monitor
Medium · مثال ٦

How do training data size and variety relate to model ability?

  1. نقرأ السؤال معًا بهدوء.
  2. Covering reality.
الإجابة: More data covering more real cases teaches broader patterns and reduces errors on new situations
Medium · مثال ٧

A medical diagnosis model scores high on training, low on testing; suggest two fixes.

  1. نقرأ السؤال معًا بهدوء.
  2. Overfitting.
الإجابة: Increase and diversify training data; simplify the model or use regularization techniques that prevent memorization
Advanced · مثال ٨

Explain why biased training data in hiring models is a fairness problem, not only a technical one.

  1. نقرأ السؤال معًا بهدوء.
  2. Social impact.
الإجابة: If trained on historically biased hiring decisions, the model reproduces the bias automatically at scale; fairness in distributing opportunities is at stake, not just accuracy
Error analysis · مثال ٩

Fix the mistake: a student claimed ١٠٠% training accuracy proves the model is perfect and ready to ship.

  1. نقرأ السؤال معًا بهدوء.
  2. Testing.
الإجابة: Full training accuracy may mean memorization; readiness is judged by accuracy on a separate test set not used in training

الخريطة الذهنية

The Basics of Machine Learning (Item ٧-١)Chapter ٧: Machine Learning and AI
▼
Programs learning patterns from data instead of being explicitly programmed with rulesWhat is machine learning?
The first uses human-written rules; the second infers rules from examplesWhat is the difference between traditional programming and machine learning?
Training a model on data labeled with correct answersFrom the lesson questions
Classifying email into spam and normal using labeled examplesGive an example of a supervised learning task.

إنفوجرافيك: Lesson map: words of the day

Lesson map: words of the day
اضغط على أي صف لترى الفكرة.
The key ideas of the lesson in order
We review the questions after one day, then after three days

تدريبات متنوعة مع الإجابات والتفسير

اكتب الإجابة أو اختر ثم اضغط. بعد كل سؤال يظهر الحل مع التفسير.

A) I choose the answer

١. From the lesson explanation: What is supervised learning?
٢. The answer "Clustering without labels" to the question "What is supervised learning?" is correct.
٣. From the lesson explanation: What is unsupervised learning?
٤. The answer "No effect" to the question "What is the role of training data quality in model performance?" is correct.
٥. The answer "To measure the model ability to generalize to new unseen data" to the question "Why split data into training and test sets?" is correct.
٦. Which question has the answer "Its parameters are gradually adjusted to reduce the error between prediction and truth"?
٧. The answer "Data is deleted" to the question "What happens during model training?" is correct.
٨. From the lesson explanation: Supervised learning: training data is labeled with correct answers, like classifying cat and dog photos.

B) I practice and answer

١. Which question has the answer "Overfitting: it memorized training and did not generalize"?
٢. The answer "Consuming electricity" to the question "What is overfitting?" is correct.
٣. The answer "Manual programming" to the question "What is supervised learning?" is correct.
٤. The answer "Complete success" to the question "A model scores ٩٩% on training and ٦٠% on testing; diagnose it." is correct.
٥. The answer "For no reason" to the question "Why split data into training and test sets?" is correct.
٦. Which question has the answer "To measure the model ability to generalize to new unseen data"?
٧. The answer "Discovering structure and groups in unlabeled data, like segmenting customers" to the question "What is unsupervised learning?" is correct.

C) I review and play

١. The answer "Sorting your files alphabetically" to the question "Give an example of a supervised learning task." is correct.
٢. The answer "No difference" to the question "What is the difference between traditional programming and machine learning?" is correct.
٣. The answer "The first uses human-written rules; the second infers rules from examples" to the question "What is the difference between traditional programming and machine learning?" is correct.
٤. Which question has the answer "The model memorizes the training data and fails on new data"?
٥. Which question has the answer "Discovering structure and groups in unlabeled data, like segmenting customers"?
٦. The answer "Nothing" to the question "What happens during model training?" is correct.
٧. The answer "Programs learning patterns from data instead of being explicitly programmed with rules" to the question "What is machine learning?" is correct.
٨. The answer "Being always accurate" to the question "What is overfitting?" is correct.

ملخص صوتي وقارئ الدرس

قارئ تجريبي يعمل بصوت جهازك (مجاني). ليس تسجيلًا احترافيًا، وجودة الصوت العربي تختلف من جهاز لآخر. التسجيل الصوتي الاحترافي لم يُنتج بعد.

Lesson topic: The Basics of Machine Learning (Item ٧-١). Machine learning is the branch of AI where programs learn from data instead of explicit rules.

We review the key points of the lesson: What is machine learning? -> Programs learning patterns from data instead of being explicitly programmed with rules; What is the difference between traditional programming and machine learning? -> The first uses human-written rules; the second infers rules from examples.

We apply what we learned by answering these questions: What is machine learning? -> Programs learning patterns from data instead of being explicitly programmed with rules; What is the difference between traditional programming and machine learning? -> The first uses human-written rules; the second infers rules from examples; What is supervised learning? -> Training a model on data labeled with correct answers.

مسار المراجعة للامتحان

  1. Day one (١٠ minutes): We read levels ١ to ٣ together, then solve exercises (A).
  2. Day two (١٠ minutes): We play the level ٤ games and solve exercises (B).
  3. Day three (١٠ minutes): Exercises (C), then the Level One test.
  4. Before the school exam: We repeat the Level Three test and look at the common mistakes.

اختبارات بثلاثة مستويات

Level One Test: The Basics

٨ أسئلة. اجب ثم اضغط «أنهِ الاختبار» لترى درجتك.

١. From the lesson explanation: What is the difference between traditional programming and machine learning?
٢. From the lesson explanation: What is overfitting?
٣. The answer "Its parameters are gradually adjusted to reduce the error between prediction and truth" to the question "What happens during model training?" is correct.
٤. The answer "It colors results" to the question "What is the role of training data quality in model performance?" is correct.
٥. From the lesson explanation: What is machine learning?
٦. From the lesson explanation: We split data into training and test sets to measure performance on data the model never saw.
٧. From the lesson explanation: Why split data into training and test sets?
٨. Which question has the answer "Classifying email into spam and normal using labeled examples"?

المصادر والحقوق

رمز QR هذه الصفحة. يفتح درس «Lesson ٧: The Basics of Machine Learning (Item ٧-١)» نفسه.