Lecture 2: Fundamentals of Machine Learning — How Does AI Learn?
The Relationship Between AI and Machine Learning
In Lecture 1, we explored how LLMs work. In this lecture, we step back one level to understand machine learning — the foundation of all AI.
| Term | Scope | Definition |
|---|---|---|
| Artificial Intelligence (AI) | Broadest | Any system that mimics human intelligent behavior |
| Machine Learning (ML) | Subset of AI | Algorithms that automatically learn patterns from data |
| Deep Learning (DL) | Subset of ML | Machine learning using multi-layer neural networks |
| LLM | Application of DL | Transformer-based language models trained on massive text |
The 3 Learning Paradigms
| Type | How It Works | Data Requirement | Real-World Examples |
|---|---|---|---|
| Supervised Learning | Learns from labeled data with correct answers | Large labeled dataset | Spam filters, facial recognition, medical diagnosis |
| Unsupervised Learning | Discovers structure in unlabeled data | No labels needed | Customer segmentation, anomaly detection, recommendation systems |
| Reinforcement Learning | Maximizes rewards through interaction with an environment | Environment simulator | AlphaGo, self-driving cars, game AI |
Train on 1 million cat photos labeled 'cat / not cat.' The goal is to identify cats in new photos. Email spam filters and medical image reading are classic examples.
Automatically groups customers with similar purchase patterns together — without knowing in advance what groups will emerge. Used for marketing segmentation and fraud detection.
Play billions of Go games, receiving +1 for a win and -1 for a loss. AlphaGo used this method to defeat world champions.
LLMs learn by predicting the next word in a sequence. No labels are needed — the vast text of the internet serves as the training data.
Overfitting
The most common pitfall in machine learning.
| Problem | Definition | Analogy | Solution |
|---|---|---|---|
| Overfitting | Perfect on training data but fails on new data | Memorizing exam questions instead of understanding concepts | More data, regularization |
| Underfitting | Fails to learn even from training data | Not studying at all | More complex model, more training |
| Good Fit | Performs well on both training and test data | Understanding concepts and solving new problems | Balanced bias-variance tradeoff |
Why we split data into training / validation / test sets:
→ Training data (70%): The model learns patterns
→ Validation data (15%): Hyperparameter tuning
→ Test data (15%): Final performance evaluation (used only once)
The golden rule: Keep the test set sealed
→ Never look at it until the very end
→ It simulates unknown, real-world data
When information from the test set seeps into the training process, data leakage occurs. The model shows great test performance but fails in the real world. This is one of the leading causes of errors in real-world medical AI systems.
Key Machine Learning Algorithms
| Algorithm | Principle | Strengths | Common Use Cases |
|---|---|---|---|
| Linear Regression | Fits a line to predict continuous output | Interpretable, fast | House price prediction, demand forecasting |
| Decision Tree | Classifies via yes/no questions | Intuitive, easy to visualize | Credit scoring, medical diagnosis |
| Random Forest | Ensemble of hundreds of trees | High accuracy, robust | Recommendation, general classification |
| Neural Network (Deep Learning) | Stacked non-linear transformations | Learns complex patterns | Images, speech, text |
| SVM | Finds a maximum-margin hyperplane | Strong with high-dimensional data | Text classification, bioinformatics |
Key Takeaways
Supervised learning: Labeled data → learn patterns → predict on new data Reinforcement learning: Trial and error + rewards → the engine behind AlphaGo and self-driving cars Overfitting: Memorizes training data but fails in the real world → test set separation is essential ML ⊂ AI, Deep Learning ⊂ ML, LLM ⊂ Deep Learning
OIYO Editorial
Content Editor지식 인큐베이터이자 전문 콘텐츠 크리에이터. 경영, 경제, 법률 및 실생활에 유용한 실무/자격증 중심의 깊이 있는 정보를 연구하고 공유합니다.