🖨️ Printing Instructions: Press Ctrl/Cmd + P and select "Save as PDF".
1
Machine Learning Basics
Classification of AI, Supervised & Unsupervised Learning, and Beyond
2
Part 1: Classification of AI
3
Classification of AI
- Artificial Narrow Intelligence (ANI): AI designed for a specific task (e.g., image recognition, playing chess). This is all of AI today.
- Artificial General Intelligence (AGI): A hypothetical AI that can perform any intellectual task a human can. Does not exist yet.
- Artificial Super Intelligence (ASI): A hypothetical AI that surpasses human intelligence in all areas. A topic of much debate.
4
Approaches of AI (Non-Inclusive)
- Symbolic / Logic-Based: Uses rules and symbol manipulation (e.g., Expert Systems).
- Statistical / Probabilistic: Uses probability theory to make decisions (e.g., Bayesian Networks, Statistical Learning).
- Computational (Connectionist): Inspired by the brain, uses neural networks (e.g., Deep Learning).
- Integrative: Combines multiple approaches.
5
AI Research Topics
- Machine Learning
- Computer Vision
- Natural Language Processing (LLMs)
- Reinforcement Learning
- Knowledge Representation and Reasoning
- Planning and Scheduling
- Search Methodologies
6
The AI / ML / DL Hierarchy
- Artificial Intelligence (AI): The broadest field, encompassing all techniques that enable machines to mimic human intelligence.
- Machine Learning (ML): A subset of AI. Systems that learn from data without being explicitly programmed.
- Deep Learning (DL): A subset of ML. Uses multi-layered neural networks to learn complex patterns.
7
Part 2: Introduction to Machine Learning
8
What is "Learning" for a Machine?
- "Machine Learning is the science of getting computers to act without being explicitly programmed." — Arthur Samuel, 1959.
- Instead of writing rules, we provide data and let the machine discover the rules.
9
The 4 Ingredients of Machine Learning
- 1. Data: The raw material. The experience the machine learns from. (e.g., images, emails, stock prices).
- 2. Model: The "brain" or the algorithm. A mathematical representation of the world. (e.g., a neural network, a decision tree).
- 3. Objective Function (Loss): The "teacher." A function that tells the model how well it's doing. The goal is to minimize this.
- 4. Learning Algorithm: The method used to "train" the model to achieve the objective (e.g., Gradient Descent).
10
Categorizing ML Techniques
- We categorize ML techniques based on the kind of Data and Objective they use.
- Main paradigms: Supervised, Unsupervised, Reinforcement Learning.
11
Part 3: Supervised Learning
12
What is Supervised Learning?
- Definition: The task of learning a function $f(X) \rightarrow y$ that maps an input $X$ to an output $y$ based on example input-output pairs.
- Keywords: Labeled data, training data, ground truth.
13
The Supervised Learning Loop
- 1. Input $X$ is fed into the Model.
- 2. Model produces an Output (prediction).
- 3. Loss Function compares output to the Targeted Output (ground truth).
- 4. Learning Algorithm adjusts the model based on the loss.
- 5. Repeat until the loss is minimized.
14
Two Major Tasks of Supervised Learning
- Classification: Predicting a discrete category. Question: "What class does this belong to?" (e.g., spam vs. not spam, cat vs. dog).
- Regression: Predicting a continuous value. Question: "How much?" or "How many?" (e.g., predicting house prices, stock prices).
15
Technique 1: Linear Regression
- Goal: Model the relationship between a dependent variable ($y$) and one or more independent variables ($X$) by fitting a straight line.
- The model learns the optimal slope and intercept to minimize the prediction error.
16
Technique 2: k-Nearest Neighbor (kNN)
- A simple, intuitive classification algorithm.
- Step 1: Find the $k$ nearest data points (neighbors) to the query point.
- Step 2: Classify the query point by a majority vote of its neighbors.
17
Part 4: Unsupervised Learning
18
What is Unsupervised Learning?
- Definition: You only have input data ($X$) and no corresponding output labels. The goal is to find hidden patterns or intrinsic structures.
- Keywords: Unlabeled data, hidden structure, patterns.
19
Classic Unsupervised Task: Clustering
- Question it answers: "What are the natural groups in my data?"
- Examples: Customer Segmentation, Image Segmentation, Genomics (grouping genes with similar expression patterns).
20
Technique 3: K-Means Clustering
- A simple and popular clustering algorithm.
- Step 1: Randomly initialize $K$ cluster centroids.
- Step 2: Assign each data point to the nearest centroid.
- Step 3: Update each centroid to be the mean of its assigned points.
- Step 4: Repeat steps 2-3 until convergence (centroids stop moving).
21
Part 5: Learning with Less Supervision
22
The Labeled Data Bottleneck
- Labeled data is the key ingredient for supervised learning, but it's expensive and time-consuming to create.
- The world is full of unlabeled data (all of Wikipedia, all of YouTube).
- How can we leverage this?
23
Semi-Supervised Learning
- Concept: Use a small amount of labeled data + a large amount of unlabeled data.
- The model learns the overall structure from the unlabeled data to improve its decisions on the labeled data.
- Analogy: A student has an answer key for Chapter 1, but not for Chapters 2-20. They can still learn a lot from the text.
24
Transfer Learning
- Concept: Take a model pre-trained on a massive dataset and adapt it for a more specific task.
- Analogy: A master chef doesn't need to re-learn how to hold a knife to learn a new recipe. They transfer their skills.
- Supervised Fine-Tuning (SFT): The process of adapting a pre-trained model using your smaller, labeled dataset. Extremely common today.
25
Self-Supervised Learning (The Key to LLMs)
- Concept: Create a supervised learning task from the unlabeled data itself.
- Analogy: Take a sentence from Wikipedia, hide a word, and ask the model to predict the missing word. The data is the sentence, the label is the hidden word!
- Impact: This is the core idea behind models like GPT and Gemini. They learn the structure of language by predicting the next word.
26
Part 6: Reinforcement Learning
27
What is Reinforcement Learning?
- It's not about labeled data; it's about learning to make a sequence of decisions.
- Analogy: Training a dog. You don't show it a flashcard. You say "sit," and when it sits, you give it a treat (reward). Over time, it learns a policy to maximize its treats.
28
Key Components of RL
- Agent: The learner or decision-maker (the dog, a robot, a game-playing AI).
- Environment: The world the agent interacts with (a room, a maze, a game of Chess).
- Action: A move the agent can make.
- Reward: The feedback from the environment (positive or negative).
- Policy: The agent's strategy for choosing actions.
29
RL Examples
- Robotics: Learning to walk or grasp objects.
- Game Playing: AlphaGo defeating the world's best Go player.
- Resource Management: Optimizing cooling systems in data centers (Google DeepMind).
31
Key Takeaways
- Supervised Learning: Labeled Data (Classification, Regression).
- Unsupervised Learning: Unlabeled Data (Clustering).
- Reinforcement Learning: No data labels, just an Environment (Agent, Rewards, Policy).
- Semi/Self/Transfer Learning: Powerful bridges that reduce the need for expensive labeled data.