LG Aimers 4기 그리고 지도학습(Supervised Learning)

2024. 1. 9. 09:09컴퓨터 전공 공부/LG Aimers

반응형

LG Aimers: AI전문가과정 4차

Module 4. 『지도학습(분류/회귀)』 

 

ㅇ 교수 : 이화여자대학교 강제원 교수 
ㅇ 학습목표 
Machine Learning의 한 부류인 지도학습(Supervised Learning)에 대한 기본 개념과 regression/classification의 목적 및 차이점에 대해 이해하고,  다양한 모델 및 방법 (linear and nonlinear regression, classification, ensemble methods, kernel methods 등)을 통해 언제 어떤 모델을 사용해야 하는지, 왜 사용하는지, 모델 성능을 향상시키는 방법을 학습하게 됩니다.

 

Foundation of Supervised Learning

-Given a set of labeled examples (𝒙1, 𝑦1) , … , (𝒙𝑁, 𝑦𝑁), learn a mapping function 𝑔: 𝑿 → 𝒀 , such that given an unseensample 𝒙′, associated output 𝑦′ is predicted.

-Regression (Examples)
Continuous variables
• Exam Score Prediction (based on time)
• Stock Price Prediction (based on time)
• Weather (temperature forecasting)

-Classification (Examples)
Discrete variables
• Pass/Fail (Binary Classification)
• Letter Grades (Multi-Level Classification)

-we want to approximate a target function f
• 𝑓: 𝑿 → 𝒀 (unknown ideal function)
• Data (𝒙1, 𝑦1) , … , (𝒙𝑁, 𝑦𝑁) ; dataset where 𝑦𝑁= 𝑓(𝒙𝑁)
• Correct label is ready for a training set
• Hypothesis 𝑔: 𝑿 → 𝒀 (ML model to approximate 𝑓) : 𝑔 ∈ H

-Model generalization
• Learning is an ill-posed problem; data is limited to find a
unique solution
• Generalization (Goal): a model needs to perform well on
unseen data
     Learning from data Learning from error (supervision)

-Errors
• From a pointwise error to overall errors
𝐸[ ℎ 𝒙𝒊 − 𝑦𝑖2]  ----> Loss Function, Cost Function.

If an input sample is chosen from training, validation, and testing datasets, the errors are called a training error (𝐸𝑡𝑟𝑎𝑖𝑛), a validation error (𝐸𝑣𝑎𝑙), and a testing error (𝐸𝑡𝑒𝑠𝑡)

-• Training error 𝐸𝑡𝑟𝑎𝑖𝑛 measured on a training set, which may
or may not represent 𝐸𝑔𝑒𝑛 ; used for fitting a model

-Bias and Variance
• Bias – error because the model can not represent the concept
• Variance – error because a model overreacts to small changes(noise) in the training data

Total Loss = Bias + Variance (+ noise)

-오늘 강의 자료에서 언더피팅과 오버피팅을 이해하기 쉬운 사진을 발견했다.

언더피팅
오버피팅

-Bias-variance trade-off
• The two objectives have tradeoff between approximation and generalization w.r.t model complexity

Bias-variance trade-off

-Avoid overfitting
(Curse of dimension) Will you increase the dimension of the data to improve the performance as well as maintain
the density of the examples per bin? If so, you need to increase the data exponentially. 

• (Remedy)
Data augmentation
Regularization to penalize complex models (variance reduction) ; make a model not too sensitive to noise or outliers (e.g. drop-out, LASSO)
Ensemble : average over a number of
models

-Cross-validation (CV)
cross-validation allows a better model to avoid overfitting (but more complexity)

Quiz
1. What are two examples of classification? Select two answers.

A. Determine when a heater is on or off based on weather data
B. Translate the numbers or letters from a handwritten message to ASCII text
C. Develop a mathematical relationship between heater level (0-100%) and temperature (20-70°C)

A
Correct. The classifier distinguishes between on or off with temperature and temperature derivatives as the features.

B
Correct. The classifier analyzes the pixels of each letter to determine the alpha-numeric value.

Quiz
2. What answers are correct for supervised learning? Select all that apply.

A. Requires labeled data that reveals the measured or true outcome
B. Training and test samples can be overlapped

A
Correct. Supervised learning uses labeled data to compute an error with a model output. 

B
False. Training and test samples must not be overlapped

반응형