AKA 머신러닝, ML
여기서 기계란 컴퓨터,computer를 뜻함. 즉 컴퓨터가 하는 학습,learning.
model이, data { training_data, training_set? } 를 통해 패턴,pattern을 배우고(학습,learning하고), 배운 대로 수행.
ML은 컴퓨터가 배울(learn) 수 있도록 하는 알고리듬,algorithms들과 기술techniques들에 대한 것.
ML은 명시적으로 프로그래밍하지 않으면서도 컴퓨터에게 학습(learn) 능력을 주는 인공지능,artificial_intelligence의 하위분야. (Arthur Samuel 1959)
model이, data { training_data, training_set? } 를 통해 패턴,pattern을 배우고(학습,learning하고), 배운 대로 수행.
ML은 컴퓨터가 배울(learn) 수 있도록 하는 알고리듬,algorithms들과 기술techniques들에 대한 것.
ML은 명시적으로 프로그래밍하지 않으면서도 컴퓨터에게 학습(learn) 능력을 주는 인공지능,artificial_intelligence의 하위분야. (Arthur Samuel 1959)
Sub:
지도학습,supervised_learning
비지도학습,unsupervised_learning
강화학습,reinforcement_learning
semi-supervised_learning
기계학습의 분류:[1]비지도학습,unsupervised_learning
강화학습,reinforcement_learning
semi-supervised_learning
지도학습,supervised_learning - labeled data로 학습
비지도학습,unsupervised_learning - labeled data 없이 학습, 데이터의 숨겨진 구조/특징 발견
강화학습,reinforcement_learning - 보상 시스템으로 학습, 의사결정을 위한 최적의 행동,action 선택
maching learning algorithms/models (via Kwak)비지도학습,unsupervised_learning - labeled data 없이 학습, 데이터의 숨겨진 구조/특징 발견
'정답지'가 없는 상태에서, 주어진 입력 데이터 중에 비슷한것끼리 묶는(clustering) 것 - 그럼 이 과정 중에 주어진 입력 데이터에 숨어있는 구조를 찾게 되는?
클러스터링,clustering
semi-supervised_learning (writing) - labeled data 및 unlabeled data 둘 다 사용되는? / 이유는 어떤 ML task에 대해서는 labeling이 힘들거나 비싼 작업이므로 이렇게 절충 방식을 사용하는 거라고..?클러스터링,clustering
강화학습,reinforcement_learning - 보상 시스템으로 학습, 의사결정을 위한 최적의 행동,action 선택
- 결정트리,decision_tree
- support_vector_machine SVM
- 로지스틱회귀,logistic_regression - curr. 회귀,regression#s-3
- k-nearest_neighbor kNN
- naive_Bayes
- artificial_neural_network ANN
- ...
- 분류,classification - assign a class label to a data point (ex. 내일 날씨가 어떨까? sunny? rainy? cloudy?)
- 회귀,regression - continuous output (ex. What is the highest temperature tomorrow?)
- clustering - divide input data into several groups (unknown class)
- ...
KU석준희
Andrew_Ng
Geoffrey_Hinton
//// 일단 http://sanghyukchun.github.io/ 여기참조.. Coursera ML강의 한국어 summary 몇개 있음. circa 2013-2016.
Andrew_Ng
Geoffrey_Hinton
//// 일단 http://sanghyukchun.github.io/ 여기참조.. Coursera ML강의 한국어 summary 몇개 있음. circa 2013-2016.
Contents
- 1. Terms / Topics
- 2. 사이트
- 3. tmp 기계학습 비교표
- 4. 강의 필기 시작
- 5. 처음배우는머신러닝 책에서 (tmp)
- 6. 1주 1강
- 7. Prediction
- 8. Inference
- 9. 1주 2강
- 10. Types of Learning
- 11. Bias-Variance Tradeoff
- 12. KNN
- 13. 1-1, 1-2 Summary
- 14. 2-1
- 15. Week 11. Reinforcement Learning (II)
- 16. 강의 필기 끝
- 17. 역사
- 18. Softwares
- 19. Links
- 20. tmp links ko
- 21. Books
- 22. Ref
- 23. rel. / mklink
1. Terms / Topics ¶
지도학습,supervised_learning
선형회귀,linear_regression - curr. see 회귀,regression
로지스틱회귀,logistic_regression
선형판별분석,linear_discriminant_analysis,LDA
K-최근접_이웃,K-nearest_neighbor,KNN
신경망,neural_network
인공신경망,artificial_neural_network,ANN
서포트벡터머신,support_vector_machine,SVM - writing
랜덤포레스트,random_forest
선형회귀,linear_regression - curr. see 회귀,regression
로지스틱회귀,logistic_regression
선형판별분석,linear_discriminant_analysis,LDA
K-최근접_이웃,K-nearest_neighbor,KNN
신경망,neural_network
인공신경망,artificial_neural_network,ANN
서포트벡터머신,support_vector_machine,SVM - writing
랜덤포레스트,random_forest
클래스 class : The category to which a given object belongs
instance / exemplar
instance / exemplar
Any given example feature vector of an object
training data // training_dataData used during training of a classifier for which the correct labels are a priori known
test/validation data // test_data validation_dataData used to estimate true (generalization) performance of a classifier, for which correct labels are also a priori known
즉 분류기,classifier가 제대로 작동하는지 평가 관련
decision_boundary // 결정경계,decision_boundary즉 분류기,classifier가 제대로 작동하는지 평가 관련
A boundary in the d-dimensional feature space that separates data points of different classes from each other
분류기,classifierAn algorithm which adjusts its parameters to find the correct decision boundaries
error // 오차,error 오류,errorIncorrect labeling of the data by the classifier
cost/loss function // 비용함수,cost_function 손실함수,loss_functionA quantitative measure that represents the cost of making an error or the deviation from the ground truth
Classifier is often trained to minimize this function
training performanceClassifier is often trained to minimize this function
The ability/performance of the classifier in correctly identifying the classes of the training data, which it has already seen
testing performance (Generalization)The ability/performance of the classifier in identifying the classes of previously unseen data
(Kwak slide 1 p67-70)2. 사이트 ¶
Machine Learning from Scratch (free online 책)
https://dafriedman97.github.io/mlbook/content/introduction.html
https://news.ycombinator.com/item?id=24332303
https://dafriedman97.github.io/mlbook/content/introduction.html
https://news.ycombinator.com/item?id=24332303
3. tmp 기계학습 비교표 ¶
되먹임,feedback | |||
지도학습,supervised_learning | labeled dataset | direct feedback | predict outcomes |
비지도학습,unsupervised_learning | unlabeled dataset | no feedback | find hidden structure |
강화학습,reinforcement_learning | interacting with the environment | reward system | learn series of actions |
4. 강의 필기 시작 ¶
석준희, 데이터학습과지능
In this course,
- supervised learning
- unsupervised & reinforcement learning
- deep learning & visualization
5. 처음배우는머신러닝 책에서 (tmp) ¶
E: 기댓값
σ: 줄일 수 없는 에러
모델이 데이터를 예측할 때 생기는 오류(error)가 편향(bias)의 제곱과 분산(variance)으로 쪼개진다는 것을 보여줌.
모델이 더 나은 성능을 내려면 편향을 줄이거나 분산을 줄여야 한다는 뜻.
편향: 데이터로 학습한 결과와 이상적인 모델 간의 차이.
분산: 모델이 학습시마다 얼마나 달라질 수 있는지 나타냄. 일반적으로 모델이 복잡할수록 분산이 더 큼.
6. 1주 1강 ¶
기존 program은 predefined and specific rules에 의해 동작. 그래서 (A machine which learns new rules from data)가 필요.
I/O를 각각 environment, action으로 하는 black box가 필요.
Output을 Y, input을 X=(X1, X2, …, Xp)이라 하면 관계는
f는 simple linear function일 수도, complicated nonlinear form일 수도 있다.
f를 estimate하는 이유는 주로 예측,prediction and 추론,inference.
I/O를 각각 environment, action으로 하는 black box가 필요.
Output을 Y, input을 X=(X1, X2, …, Xp)이라 하면 관계는
- X: input variables; predictors, observed data, states & actions
- Y: output variable; target of prediction, assigned cluster(뭐지?), rewards
f는 simple linear function일 수도, complicated nonlinear form일 수도 있다.
f를 estimate하는 이유는 주로 예측,prediction and 추론,inference.
7. Prediction ¶
Based on X, we want to predict Y through f()
When we accept the square error , it is easy to show
참고로 error의 square가 error의 absolute value( )보다 계산하기에 훨씬 수월하다고 한다. 그 이유는 다항함수는 모든 점에서 미분 가능하기 때문.
- : 실제 를 추정한 값
- : 추정되는 사이 관계
7.1. Regression Problem vs Classification Problem ¶
Prediction problem에 두 가지가 있는데, 바로 regression & classification.
high/middle/low는 discrete outcome처럼 보이지만 order가 있으므로 classification problem이 아님.
Error는 mean square error (MSE)로 측정한다.
Problem | Prediction for | e.g. | MSE= |
Regression | continuous outcome | height, salary, lifespan, number of peeing a day | |
Classification | order가 없는 discrete outcome | pass or fail, subtyeps of breast cancer, preference to TV channels, M/F |
Error는 mean square error (MSE)로 측정한다.
: observed value
: estimated or predicted value
: indication function; x가 참이면 1, 거짓이면 0
: estimated or predicted value
: indication function; x가 참이면 1, 거짓이면 0
8.1. Estimating f ¶
- Parametric approach: 관계를 가정 (usually linear)
- Nonparametric approach: assumes no prior relation
e.g. tree-based methods, kNN
모델이 넓은 범위의 function을 표현할 수 있다면 flexible or complex하다고 한다.
e.g.
에서 후자가 더 flexible하다.
Tradeoff between interpretability and flexibility
Spline function이 더 flexible
Linear line이 더 interpretable
Spline function이 더 flexible
Linear line이 더 interpretable
10. Types of Learning ¶
Supervised vs. Unsupervised Learning
Supervised learning: both X and Y are given
e.g. automated robots
e.g. prediction and inference
Unsupervised learning: only X is given; Y is unknown or hiddene.g. clustering (see pics)
Semisupervised learning: 둘의 사이e.g. supervised clustering, prediction after dimension reduction
Reinforcement learning: finding the next action maximizing rewardse.g. automated robots
Training set의 MSE를 원하는 만큼 줄일 수 있다. Model flexibility를 증가시킴으로써.
Overfitting
11. Bias-Variance Tradeoff ¶
MSE can be rewritten by
앞의 Var, Bias는 reducible하고 그 오른쪽 Var는 irreducible
Variance
: How much is variable when trained by different training sets
이상적이라면, 가 너무 variable해선 안됨
Bias이상적이라면, 가 너무 variable해선 안됨
: Error
Variance와 Bias 관계는 화학 첫시간에 했던 그거랑 비슷.Trade-off: No free lunch
Reducing the variance by reducing the flexibility increase the bias.
Reducing the bias by increasing the flexibility increase the variance.
↓ : reducing, ↑ : increase
flexibility↓ - variance↓ but bias↑
flexibility↑ - bias↓ but variance↑
분산,varianceReducing the bias by increasing the flexibility increase the variance.
↓ : reducing, ↑ : increase
flexibility↓ - variance↓ but bias↑
flexibility↑ - bias↓ but variance↑
12. KNN ¶
K-nearest neightbor method
Determine the outcome of a sample, using the k nearest samples of known outcomes
Totally nonparametric
Simple but powerful
k가 작으면 high flexibility.Totally nonparametric
Simple but powerful
13. 1-1, 1-2 Summary ¶
- Machine learning is to find unspecified rules from data
- Prediction is to guess Y when X is given
- Inference is to select important X for Y
- Generally, low model flexibility means high interpretability, high bias, and low variance
- High model flexibility means low interpretability, low bias, and high variance
14. 2-1 ¶
One output variable, one input variable:
The data is modeled by
for
X, Y는 확률변수,random_variable
x, y는 observed sample values in real data
: 편차,deviation
for
x, y는 observed sample values in real data
: 편차,deviation
RSS: residual sum of squares //.... curr goto 잔차,residual
We estimate coefficients by minimizing RSS.
Confidence of Coefficient Estimates
- How much are and close to and ?
- Recall the mean of population from random samples.
- Confidence interval:
- T-test against H0
using a t-statistic
15. Week 11. Reinforcement Learning (II) ¶
Introduction to Markov Decision Process
17. 역사 ¶
Jaime Carbonell et al.의 1983년 논문에 의하면 ML은 지금까지 세 가지 접근법으로 연구되었다.
- 신경 모형 패러다임 neural model paradigm; 퍼셉트론,perceptron에서 출발, 이후 심층학습,deep_learning으로 발전
- 심볼 개념의 학습 패러다임 symbolic concept-acquisition paradigm: 숫자나 통계 대신 논리,logic학이나 그래프,graph구조 사용; 1970중반-80후반까지 AI의 핵심 접근법
- 현대지식의 집약적 패러다임 modern knowledge-intensive paradigm: tabula rasa를 지양, 대표적인 경우가 의사결정 트리 decision tree
만약 컴퓨터 프로그램이 특정한 태스크 T를 수행할 때 성능 P만큼 개선되는 경험 E를 보이면, 그 컴퓨터 프로그램은 태스크 T와 성능 P에 대해 경험 E를 학습했다고 할 수 있다.Tom Mitchell (1997)
“ A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T as measured by P, improves with experience E ”
Ex. 필기체 인식 학습
T: 필기체를 인식하고 분류하는 것
P: 필기체를 정확히 구분한 확률
E: 글자 데이터셋
분류, 군집 같은 기술을 CS 관점에서는 머신러닝이라고 하고 통계,statistics학 관점에서는 데이터마이닝,data_mining이라고 한다. 다만 ML은 학습과 예측에 초점을, DM은 가지고 있는 자료,data에서 현상과 특성을 발견하는 것에 초점을 맞춘다.P: 필기체를 정확히 구분한 확률
E: 글자 데이터셋
18. Softwares ¶
어떤건 심층학습,deep_learning에만 해당? 저기로 mv? 암튼 대충적음, 나중에 mv/fix
텐서플로,TensorFlow
케라스,Keras
{
텐서플로,TensorFlow 위에
... keras
}
토치,Torch
파이토치,PyTorch
MXNet
{
Apache MXNet
엠엑스넷?
... mxnet
}
Caffe
CNTK
케라스,Keras
{
텐서플로,TensorFlow 위에
... keras
}
토치,Torch
파이토치,PyTorch
MXNet
{
Apache MXNet
엠엑스넷?
... mxnet
}
Caffe
Caffe (Convolutional Architecture for Fast Feature Embedding)
open source (BSD)
developed by Berkeley AI Research (BAIR) Berkeley Vision and Learning Center (BVLC)
image_classification
image_segmentation { 영상_분할 Image_segmentation }
파생: Caffe2 (최초 개발자가 Facebook으로 이직하면서 PyTorch로 흡수?), NVCaffe (Nvidia)
Caffe_(software)
Theanoopen source (BSD)
developed by Berkeley AI Research (BAIR) Berkeley Vision and Learning Center (BVLC)
image_classification
image_segmentation { 영상_분할 Image_segmentation }
파생: Caffe2 (최초 개발자가 Facebook으로 이직하면서 PyTorch로 흡수?), NVCaffe (Nvidia)
Caffe_(software)
CNTK
19. Links ¶
Machine Learning Engineering Book (mlebook.com)
http://www.mlebook.com/wiki/doku.php
유료이나, draft의 PDF 공개. (Released Drafts of the Chapters: 1-10)
https://news.ycombinator.com/item?id=24726818
http://www.mlebook.com/wiki/doku.php
유료이나, draft의 PDF 공개. (Released Drafts of the Chapters: 1-10)
https://news.ycombinator.com/item?id=24726818
via 마스터 알고리즘 책 끝에서
UCI(UC Irvine) Machine Learning Repository https://archive.ics.uci.edu/ml/
https://www.kaggle.com/
UCI(UC Irvine) Machine Learning Repository https://archive.ics.uci.edu/ml/
https://www.kaggle.com/
Machine Learning | Google Developers (Google 머신러닝 교육, 튜토리얼들)
https://developers.google.com/machine-learning?hl=ko
https://developers.google.com/machine-learning?hl=ko
20. tmp links ko ¶
Learning From Data(Abu-Mostafa et al)과, Caltech의 강의(18강) 정리. (한국어, pdf, 11쪽, 2015)
http://theyearlyprophet.com/lfd.html
http://theyearlyprophet.com/lfd.html
21. Books ¶
Pattern Recognition & Machine Learning - PRML - Christopher Bishop ... prml book
http://norman3.github.io/prml/ - "이 페이지는 PRML을 정리한 문서입니다." (요약)
http://norman3.github.io/prml/ - "이 페이지는 PRML을 정리한 문서입니다." (요약)
23. rel. / mklink ¶
----
- [1] http://matrix.skku.ac.kr/2022-AI4Dummies/ "딥러닝 시스템은 지도(supervised)학습과"... 에 있는 분류에 따름