AI Literacy Chapter 2 4 min read

Lecture 2: Fundamentals of Machine Learning — How Does AI Learn?

O
OIYO Editorial Contributor
2/5

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.

The AI Hierarchy
TermScopeDefinition
Artificial Intelligence (AI)BroadestAny system that mimics human intelligent behavior
Machine Learning (ML)Subset of AIAlgorithms that automatically learn patterns from data
Deep Learning (DL)Subset of MLMachine learning using multi-layer neural networks
LLMApplication of DLTransformer-based language models trained on massive text

The 3 Learning Paradigms

Comparison of Machine Learning Types
TypeHow It WorksData RequirementReal-World Examples
Supervised LearningLearns from labeled data with correct answersLarge labeled datasetSpam filters, facial recognition, medical diagnosis
Unsupervised LearningDiscovers structure in unlabeled dataNo labels neededCustomer segmentation, anomaly detection, recommendation systems
Reinforcement LearningMaximizes rewards through interaction with an environmentEnvironment simulatorAlphaGo, self-driving cars, game AI
1
Supervised Learning: Learning with a Teacher

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.

2
Unsupervised Learning: Self-Discovery

Automatically groups customers with similar purchase patterns together — without knowing in advance what groups will emerge. Used for marketing segmentation and fraud detection.

3
Reinforcement Learning: Learning by Trial and Error

Play billions of Go games, receiving +1 for a win and -1 for a loss. AlphaGo used this method to defeat world champions.

4
Self-Supervised Learning: The LLM Approach

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.

Overfitting vs. Underfitting
ProblemDefinitionAnalogySolution
OverfittingPerfect on training data but fails on new dataMemorizing exam questions instead of understanding conceptsMore data, regularization
UnderfittingFails to learn even from training dataNot studying at allMore complex model, more training
Good FitPerforms well on both training and test dataUnderstanding concepts and solving new problemsBalanced 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

Core ML Algorithms Every Non-Expert Should Know
AlgorithmPrincipleStrengthsCommon Use Cases
Linear RegressionFits a line to predict continuous outputInterpretable, fastHouse price prediction, demand forecasting
Decision TreeClassifies via yes/no questionsIntuitive, easy to visualizeCredit scoring, medical diagnosis
Random ForestEnsemble of hundreds of treesHigh accuracy, robustRecommendation, general classification
Neural Network (Deep Learning)Stacked non-linear transformationsLearns complex patternsImages, speech, text
SVMFinds a maximum-margin hyperplaneStrong with high-dimensional dataText 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

O

OIYO Editorial

Content Editor

지식 인큐베이터이자 전문 콘텐츠 크리에이터. 경영, 경제, 법률 및 실생활에 유용한 실무/자격증 중심의 깊이 있는 정보를 연구하고 공유합니다.