An introduction to the core concepts of artificial intelligence and the distinction between traditional programming and machine learning.
How does a self-driving car 'see' a stop sign? It isn't following a million 'if-then' rules written by a human; it has learned to recognize the world much like you did as a child—through experience and patterns.
In traditional programming, humans provide rules and data to get an answer. In Artificial Intelligence (AI), we aim to mimic human cognitive functions. However, AI is a broad umbrella. Machine Learning (ML) is a specific subset of AI that uses statistical techniques to enable machines to 'learn' from data without being explicitly programmed for every task. Within ML lies Deep Learning (DL), which utilizes multi-layered Artificial Neural Networks to solve highly complex problems like facial recognition. Think of it as a hierarchy: All Deep Learning is Machine Learning, and all Machine Learning is AI, but the reverse is not true.
Quick Check
If a program uses a simple set of hard-coded 'if-else' logic to simulate a conversation, is it Machine Learning or AI?
Answer
It is AI (specifically 'Symbolic AI'), but it is NOT Machine Learning because it doesn't improve its performance through data.
How do machines actually learn? There are three primary paradigms: 1. Supervised Learning: The model is fed 'labeled' data. For every input , we provide a target output . The goal is to learn a mapping function . 2. Unsupervised Learning: The model receives data without labels. It looks for hidden patterns or structures, such as clustering similar customers together. 3. Reinforcement Learning (RL): An 'agent' learns by interacting with an environment. It receives rewards for good actions and penalties for bad ones, aiming to maximize the cumulative reward .
1. We collect 10,000 emails. 2. Humans label them as 'Spam' or 'Not Spam'. 3. The algorithm analyzes the frequency of words like 'Winner' or 'Account' in both categories. 4. This is Supervised Learning because the 'correct answers' were provided during training.
Quick Check
A system groups thousands of news articles into categories like 'Sports' and 'Politics' without being told what the categories are. Which learning type is this?
Answer
Unsupervised Learning (specifically Clustering).
A model is only as good as its data. To build a reliable model, we split our dataset into two parts: the Training Set and the Testing Set (often an 80/20 split). The model learns patterns from the training set. We then use the testing set—which the model has never seen—to evaluate its performance. If a model performs perfectly on training data but fails on testing data, it has suffered from Overfitting. This means it 'memorized' the noise in the training data rather than learning the general underlying pattern.
1. Training: You study 50 practice problems from a textbook where the answers are in the back. 2. Testing: Your teacher gives you a final exam with 10 new problems you've never seen. 3. If you only memorized the answers to the 50 practice problems without understanding the formulas, you will fail the exam. This is exactly what happens when an AI model overfits.
Which of the following is the most specific (narrowest) field?
If a model has high accuracy on training data but very low accuracy on testing data, what has occurred?
Unsupervised learning requires a 'teacher' to provide the correct labels for every input.
Review Tomorrow
In 24 hours, try to explain the difference between Supervised and Unsupervised learning to a friend using the 'fruit' analogy.
Practice Activity
Research a real-world application of Reinforcement Learning (Hint: Look at AlphaGo or robotics) and identify what the 'reward' is in that system.