What AI and machine learning are
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
AI is the broad goal of getting machines to do tasks that seem to need intelligence. Machine learning is one way to get there: instead of writing the rules by hand, you give the computer labelled examples and it finds the patterns. Watch a hand-written spam rule miss a trick, then train a tiny model on six emails and let it sort mail it has never seen.
5 أسئلة سريعة
اختر إجابة لتعرف السبب. تُحفَظ نتيجتك مع تقدّمك.
01How are AI and machine learning related?
AI is the goal of machines doing tasks that need intelligence. Machine learning is one approach to it. A hand-written rule is AI too, but nothing in it is learned.
02The rule says: if "free money" is in the email, it is spam. Why does "free prize inside" reach the inbox?
A hand-written rule only does what it says. Spammers change their words, so someone would have to keep adding rules by hand.
03In the spam filter, what is the training data?
Training data is the examples with the right answers (labels). The word scores are the model, which training produces from that data.
04After training, "free" scores +2, "prize" +2, "notes" −2 and "lunch" −1; any other word scores 0. What does the model predict for "free lunch"?
free +2 plus lunch −1 makes +1, which is above zero, so the prediction is spam. The model never needs to have seen this exact email: it uses the patterns it learned.
05A program learns to play a game by trying moves and getting points for good ones. Which kind of learning is that?
Reinforcement learning learns from rewards and penalties. Supervised learning needs labelled examples; unsupervised learning finds groups without any labels.
المسرد
- Artificial intelligence (AI)
- The broad goal of getting machines to do tasks that seem to need intelligence, such as understanding speech or sorting email.
- Machine learning (ML)
- One way to do AI: a program finds patterns in examples instead of following rules a person wrote.
- Training data
- The examples a model learns from. In supervised learning each example comes with its label.
- Label
- The right answer attached to an example, such as spam or not spam. People usually add labels by hand.
- Model
- What training produces and keeps: the learned patterns (here, one score per word), not the examples themselves.
- Prediction
- The model's answer for a new example it has never seen, such as spam for a new email.
- Supervised, unsupervised, reinforcement
- Learning from labelled examples; finding groups in unlabelled data; learning from rewards and penalties by trying actions.
- Generative model
- A model that produces new content, such as text or images. A language model writes by predicting a likely next word (token), again and again.
الملاحظات والمصادر
- The word-score learner is a real, runnable program, but a toy. Real spam filters weigh words by probability (a method called naive Bayes) and learn from thousands of emails.
- Hand-written rules are still a kind of AI (older "expert systems" were built from them), but they are not machine learning: nothing is learned from data.
- Language models really predict tokens (whole words or pieces of words) and choose among many likely ones. The words in the last step are an illustration, not the output of a real model.
- The Python program in the lesson is real: run it and it prints "spam" then "not spam".
- Stanford CS229 Machine Learning, lecture notes (A. Ng, T. Ma): supervised learning, naive Bayes spam filtering, clustering
- McCarthy, Minsky, Rochester & Shannon, A Proposal for the Dartmouth Summer Research Project on Artificial Intelligence (1955)
- Russell & Norvig, Artificial Intelligence: A Modern Approach, 4th ed. (2020)
- T. Mitchell, Machine Learning (McGraw-Hill, 1997), chapter 1: learning from experience
- Sutton & Barto, Reinforcement Learning: An Introduction, 2nd ed. (2018)
- Google for Developers, Introduction to Machine Learning: supervised, unsupervised, reinforcement and generative AI
- P. Graham, A Plan for Spam (2002): learning a spam filter from labelled mail
- Brown et al., Language Models are Few-Shot Learners (2020)
- Python Library Reference: collections.Counter
اختبار يتاح بعد الخطوة الأخيرة.