SlideShare une entreprise Scribd logo
1  sur  54
Télécharger pour lire hors ligne
Naive ML Overview
홍철주
발표자 소개
홍철주
• http://blog.fegs.kr
• https://github.com/FeGs
• Machine Learning Newbie
• SW Maestro 5th
2
목차
• 기계 학습
• 지도 학습
• 분류
• 회귀
• 비지도 학습
• 사례
3
머신러닝 개발 순서 中
• 데이터 수집
• 데이터 준비 (Data cleaning)
• 데이터 분석 (Data analysis, Feature engineering)
• 데이터 학습 (Modeling)
• 모델 성능 평가 (Evaluation)
오늘은 이 부분을 다룹니다
4
용어 정의
• Machine Learning
• Feature / Attribute
• Target variable / Label
• Training set / Testing set
5
기계 학습
• Supervised Learning (지도 학습)
• 데이터 X에 대해 Y를 예측하는 것
• 답이 있는 문제에서 답을 예측하는 것
• Unsupervised Learning (비지도 학습)
• 데이터 X는 어떻게 설명될 수 있는가
• 해석은 알아서
http://en.wikipedia.org/wiki/List_of_machine_learning_concepts
6
기계 학습
7
기계 학습
8
지도 학습 학습 단계
MachineFeatures
Target variable
Modeling
9
지도 학습 테스트 단계
MachineFeatures
Predicted
target variable
predicted = model(features)
10
지도 학습 성능 평가 단계
Machine
Training Data Features
(w/o target variable)
Predicted Target Variables
Accuracy = Correctly Predicted Target Variables / Total Predicted Target Variables
11
지도 학습 성능 평가 단계
Cross Validation 교차검증
Training Data Set 1/5
Training Data Set 2/5
Training Data Set 3/5
Training Data Set 4/5
Training Data Set 5/5
Training Data Set 2/5
Training Data Set 1/5
Training Data Set 3/5
Training Data Set 4/5
Training Data Set 5/5
…
Training Data Set 5/5
Training Data Set 1/5
Training Data Set 2/5
Training Data Set 4/5
Training Data Set 5/5
accuracy0 accuracy1 accuracy4
Final Accuracy = mean(accuracy0, accuracy1, …, accuracy4)
Test Data로 사용
Overfitting 판단에도 도움을 준다! Why?
12
Over/Underfitting
13
Further reading - Bias-Variance Tradeoff
High VarianceHigh bias
지도 학습
• Classification 분류
• Target variable: Discrete value
• Regression 회귀
• Target variable: Continuous value
14
분류 문제 예시
• 스팸 메일 분류
• 필기체 인식
• 얼굴 인식
• 문서 분류
• 음성 인식 등..
15
분류 문제
• Decision Trees
• Support Vector Machine
• k-NN
• Naive Bayes
• Neural Networks
16
Decision Trees
17
Ensemble of classifier
18
• Random Forest (Ensemble learning)
• ex) SVM + Logistic Regression + Random Forest
여러 분류기를 사용하는데
더 많은 분류기가 예측한 값을 최종 분류값으로 내놓음.
Overfitting도 피하고 정확도도 높여보고!
SVM
19
SVM
20
k-NN
21
Naive Bayes
22
Neural Networks
23
이건 다음에
Example: MNIST (kaggle)
Data : Handwritten digits image (28px * 28px, grayscale)
Target variable : digit number
0 1 2 3 4 5
24
Example: MNIST (kaggle)
Features : pixel0, pixel1, …, pixel783 (28 * 28)
[…, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
23, 210, 254, 253, 159, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, …]
Target Variable : 0
접근 1 - 픽셀 하나하나를 Feature로 간주
25
Example: MNIST (kaggle)
[…, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
23, 210, 254, 253, 159, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, …]
784차원 공간을 생각해보자 :
Method 1: k-NN
Method 2: SVM
Method 3: Random Forest, etc..
784차원 공간에서 가까이 있는 좌표의 label은?
784차원 공간을 783차원 초평면으로 갈라서 분류해보면?
이 위치에 하얀 픽셀이 있고 저기엔 없으면?
어떤 방법이 가장 좋은가?
26
Example: MNIST (kaggle)
접근 2 - 이미지 프로세싱으로 Feature를 만들어내기
End point and junctions distribution
교차점, 끝점 갯수 등을
Feature로 이용함.
ex) 8은 교차점이 1개,
끝점은 0개
Feature Extraction
27
Example: MNIST (kaggle)
높은 정확도와 Insight를 얻기 위한 시각화
Averaging Images
Visualizing Random Forest
28
Example: MNIST
• http://yann.lecun.com/exdb/mnist/
29
최적화
• 한 알고리즘에서 조건을 바꿔가며 성능 평가를 시행하
여 최적의 Parameter를 찾는 것
• Grid Search 등을 이용해서 찾을 수 있다.
30
회귀 문제
• 1, 2, 3, 다음에 올 숫자는?
• 4? (d=1, 등차수열)
• 5? (피보나치)
• …
31
회귀 문제 예시
• 가격 예측
• ?
32
회귀 문제
• Linear Regression
• (+ Ridge, Lasso)
• Neural Networks
• Logistic Regression
33
Linear Regression
34
Neural Networks
35
이건 다음에
비지도 학습
• Clustering 군집화
• Association Rule Learning 연관 규칙 학습
36
군집화 문제 예시
37
• 비슷한 문서 찾기
• Collaborative Filitering (추천 시스템)
군집화 문제
38
• k-Means clustering
• EM algorithm
k-Means Clustering
39
EM Algorithm
40
연관 규칙 학습 문제 예시
41
• 연관 상품 추천 (Continuous Production)
• 연관 웹페이지 추천 (Web Usage Mining)
• 등등
연관 규칙 학습
42
• Support
• Confidence
• A -> B?
사례 분석
• 스팸 메일 분류
• 필기체 인식
• 음성 인식
• 얼굴 인식
• 상품 추천
43
스팸 메일 분류
접근 : Bayesian filtering
간단히 Spam / Not spam (Ham) 을 구분하는 문제
내용만으로 분류를 하는 접근
Pr(S|W) = 단어 W가 들어있을 때 스팸일 확률
Pr(W|S) = 스팸에 단어 W가 있을 확률
Pr(S) = 스팸 확률
Pr(W|H) = 햄에 단어 W가 있을 확률
Pr(H) = 햄 확률
스팸에서 W가 등장하는 횟수 / 스팸 총 단어 수
통계적으로 0.2
햄에서 W가 등장하는 횟수 / 햄 총 단어 수
통계적으로 0.8
44
필기체 인식 (MNIST 문제를 어떻게 풀어봤나)
접근 1: PCA + k-NN
단순히 k-NN을 쓰면 시간이 많이 소요된다.
그렇다면 차원을 낮추자! - PCA
10차원으로 낮췄을 때 : 92.6%
33차원으로 낮췄을 때 : 97.3%
5 3 8 9
56차원으로 낮췄을 때 : 97.2%
45
필기체 인식 (MNIST 문제를 어떻게 풀어봤나)
접근 2: CNN (Convolutional Neural Networks)
이건 다음에
46
음성 인식
접근 : Neural Networks
47
MFCCs
Zero Crossing Rate
Spectral Centroid
…
등을 feature로 사용
이미지 픽셀을 쓰는거랑 비슷함
얼굴 인식
접근 : SVM + Sliding Window
48
얼굴 데이터로만 학습
Window
이 영역이 얼굴인가? (분류)
상품 추천
접근 1 : k-Means clustering
49
다른 사람도 봤던 상품이 무엇인지 알려주기
Features : product1, product2, …, productN (seen)
[…, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, …]
Product Vector
상품 추천
접근 2 : EM algorithm Clustering
50
Pr(P2|P1) = 상품 P1을 봤던 사람이 상품 P2를 볼 확률
Pr(P1|P2) = 상품 P2를 봤던 사람이 상품 P1을 볼 확률
Pr(P2) = P2를 볼 확률
Pr(P1) = P1을 볼 확률
Pr(P2|P1) = Pr(P1|P2) * Pr(P2) / Pr(P1)
있을 법한 상품 조합 찾아내기
상품 추천
접근 3 : Apriori algorithm (Associative Rule Learning)
51
상품간 연관 규칙 발견하기
접근 4 : TF-IDF (Content-based filtering)
상품간 유사성 발견하기
…
Tools
• ipython
• numpy, scipy (scientific computing)
• matplotlib (ploting library)
• scikit-learn (general machine learning algorithm
set)
• theano (for fast deep learning)
• gensim (topic modeling library)
52
실습합시다
EOF

Contenu connexe

Tendances

Learning by association
Learning by associationLearning by association
Learning by association홍배 김
 
4.convolutional neural networks
4.convolutional neural networks4.convolutional neural networks
4.convolutional neural networksHaesun Park
 
Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)
Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)
Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)건환 손
 
차원축소 훑어보기 (PCA, SVD, NMF)
차원축소 훑어보기 (PCA, SVD, NMF)차원축소 훑어보기 (PCA, SVD, NMF)
차원축소 훑어보기 (PCA, SVD, NMF)beom kyun choi
 
3.unsupervised learing
3.unsupervised learing3.unsupervised learing
3.unsupervised learingHaesun Park
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)홍배 김
 
내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)SANG WON PARK
 
코드와 실습으로 이해하는 인공지능
코드와 실습으로 이해하는 인공지능코드와 실습으로 이해하는 인공지능
코드와 실습으로 이해하는 인공지능도형 임
 
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지Haesun Park
 
사이킷런 최신 변경 사항 스터디
사이킷런 최신 변경 사항 스터디사이킷런 최신 변경 사항 스터디
사이킷런 최신 변경 사항 스터디Haesun Park
 
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련Haesun Park
 
5.model evaluation and improvement
5.model evaluation and improvement5.model evaluation and improvement
5.model evaluation and improvementHaesun Park
 
4.representing data and engineering features(epoch#2)
4.representing data and engineering features(epoch#2)4.representing data and engineering features(epoch#2)
4.representing data and engineering features(epoch#2)Haesun Park
 
Intriguing properties of contrastive losses
Intriguing properties of contrastive lossesIntriguing properties of contrastive losses
Intriguing properties of contrastive lossestaeseon ryu
 
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류Haesun Park
 
R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작Terry Cho
 
Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리SANG WON PARK
 
2.supervised learning
2.supervised learning2.supervised learning
2.supervised learningHaesun Park
 
2.linear regression and logistic regression
2.linear regression and logistic regression2.linear regression and logistic regression
2.linear regression and logistic regressionHaesun Park
 
기계학습을 이용한 숫자인식기 제작
기계학습을 이용한 숫자인식기 제작기계학습을 이용한 숫자인식기 제작
기계학습을 이용한 숫자인식기 제작Do Hoerin
 

Tendances (20)

Learning by association
Learning by associationLearning by association
Learning by association
 
4.convolutional neural networks
4.convolutional neural networks4.convolutional neural networks
4.convolutional neural networks
 
Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)
Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)
Python Machine Learning - ML03 Support Vector Machine(서포트 벡터 머신)
 
차원축소 훑어보기 (PCA, SVD, NMF)
차원축소 훑어보기 (PCA, SVD, NMF)차원축소 훑어보기 (PCA, SVD, NMF)
차원축소 훑어보기 (PCA, SVD, NMF)
 
3.unsupervised learing
3.unsupervised learing3.unsupervised learing
3.unsupervised learing
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)
 
내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)
 
코드와 실습으로 이해하는 인공지능
코드와 실습으로 이해하는 인공지능코드와 실습으로 이해하는 인공지능
코드와 실습으로 이해하는 인공지능
 
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 2장. 머신러닝 프로젝트 처음부터 끝까지
 
사이킷런 최신 변경 사항 스터디
사이킷런 최신 변경 사항 스터디사이킷런 최신 변경 사항 스터디
사이킷런 최신 변경 사항 스터디
 
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 4장. 모델 훈련
 
5.model evaluation and improvement
5.model evaluation and improvement5.model evaluation and improvement
5.model evaluation and improvement
 
4.representing data and engineering features(epoch#2)
4.representing data and engineering features(epoch#2)4.representing data and engineering features(epoch#2)
4.representing data and engineering features(epoch#2)
 
Intriguing properties of contrastive losses
Intriguing properties of contrastive lossesIntriguing properties of contrastive losses
Intriguing properties of contrastive losses
 
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류
[홍대 머신러닝 스터디 - 핸즈온 머신러닝] 3장. 분류
 
R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작
 
Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리
 
2.supervised learning
2.supervised learning2.supervised learning
2.supervised learning
 
2.linear regression and logistic regression
2.linear regression and logistic regression2.linear regression and logistic regression
2.linear regression and logistic regression
 
기계학습을 이용한 숫자인식기 제작
기계학습을 이용한 숫자인식기 제작기계학습을 이용한 숫자인식기 제작
기계학습을 이용한 숫자인식기 제작
 

En vedette

Basic Understanding of the Deep
Basic Understanding of the DeepBasic Understanding of the Deep
Basic Understanding of the DeepMad Scientists
 
Reproducibility and automation of machine learning process
Reproducibility and automation of machine learning processReproducibility and automation of machine learning process
Reproducibility and automation of machine learning processDenis Dus
 
Src슬라이드(1총괄1세부) 임요한
Src슬라이드(1총괄1세부) 임요한Src슬라이드(1총괄1세부) 임요한
Src슬라이드(1총괄1세부) 임요한SRCDSC
 
Machine Learning in Magento 2
Machine Learning in Magento 2Machine Learning in Magento 2
Machine Learning in Magento 2Alexander Makeev
 
Dm ml study_roadmap
Dm ml study_roadmapDm ml study_roadmap
Dm ml study_roadmapKang Pilsung
 
Machine learning in spam
Machine learning in spamMachine learning in spam
Machine learning in spamTae Young Lee
 
Machine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and TechniquesMachine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and TechniquesRui Pedro Paiva
 
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016Amazon Web Services Korea
 
데이터분석의 길 5: “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)
데이터분석의 길 5:  “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)데이터분석의 길 5:  “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)
데이터분석의 길 5: “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)Jaimie Kwon (권재명)
 
머신러닝 시그 세미나_(deep learning for visual recognition)
머신러닝 시그 세미나_(deep learning for visual recognition)머신러닝 시그 세미나_(deep learning for visual recognition)
머신러닝 시그 세미나_(deep learning for visual recognition)Yonghoon Kwon
 
Deep learning 기반TmapPOI 추천기술개발사례
Deep learning 기반TmapPOI 추천기술개발사례Deep learning 기반TmapPOI 추천기술개발사례
Deep learning 기반TmapPOI 추천기술개발사례Lee Ji Eun
 
데이터분석의 길 4: “고수는 통계학습의 달인이다”
데이터분석의 길 4:  “고수는 통계학습의 달인이다”데이터분석의 길 4:  “고수는 통계학습의 달인이다”
데이터분석의 길 4: “고수는 통계학습의 달인이다”Jaimie Kwon (권재명)
 
20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표
20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표
20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표Taejoon Yoo
 
2012 빅데이터 big data 발표자료
2012 빅데이터 big data 발표자료2012 빅데이터 big data 발표자료
2012 빅데이터 big data 발표자료Wooseung Kim
 
Deview deep learning-김정희
Deview deep learning-김정희Deview deep learning-김정희
Deview deep learning-김정희NAVER D2
 

En vedette (15)

Basic Understanding of the Deep
Basic Understanding of the DeepBasic Understanding of the Deep
Basic Understanding of the Deep
 
Reproducibility and automation of machine learning process
Reproducibility and automation of machine learning processReproducibility and automation of machine learning process
Reproducibility and automation of machine learning process
 
Src슬라이드(1총괄1세부) 임요한
Src슬라이드(1총괄1세부) 임요한Src슬라이드(1총괄1세부) 임요한
Src슬라이드(1총괄1세부) 임요한
 
Machine Learning in Magento 2
Machine Learning in Magento 2Machine Learning in Magento 2
Machine Learning in Magento 2
 
Dm ml study_roadmap
Dm ml study_roadmapDm ml study_roadmap
Dm ml study_roadmap
 
Machine learning in spam
Machine learning in spamMachine learning in spam
Machine learning in spam
 
Machine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and TechniquesMachine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and Techniques
 
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
 
데이터분석의 길 5: “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)
데이터분석의 길 5:  “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)데이터분석의 길 5:  “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)
데이터분석의 길 5: “고수는 큰자료를 두려워하지 않는다” (클릭확률예측 상편)
 
머신러닝 시그 세미나_(deep learning for visual recognition)
머신러닝 시그 세미나_(deep learning for visual recognition)머신러닝 시그 세미나_(deep learning for visual recognition)
머신러닝 시그 세미나_(deep learning for visual recognition)
 
Deep learning 기반TmapPOI 추천기술개발사례
Deep learning 기반TmapPOI 추천기술개발사례Deep learning 기반TmapPOI 추천기술개발사례
Deep learning 기반TmapPOI 추천기술개발사례
 
데이터분석의 길 4: “고수는 통계학습의 달인이다”
데이터분석의 길 4:  “고수는 통계학습의 달인이다”데이터분석의 길 4:  “고수는 통계학습의 달인이다”
데이터분석의 길 4: “고수는 통계학습의 달인이다”
 
20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표
20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표
20160203_마인즈랩_딥러닝세미나_07 머신러닝 기반 고객 이탈 분석 유태준대표
 
2012 빅데이터 big data 발표자료
2012 빅데이터 big data 발표자료2012 빅데이터 big data 발표자료
2012 빅데이터 big data 발표자료
 
Deview deep learning-김정희
Deview deep learning-김정희Deview deep learning-김정희
Deview deep learning-김정희
 

Similaire à Naive ML Overview

Siamese neural networks for one shot image recognition paper explained
Siamese neural networks for one shot image recognition paper explainedSiamese neural networks for one shot image recognition paper explained
Siamese neural networks for one shot image recognition paper explainedtaeseon ryu
 
딥러닝을 위한 Tensor flow(skt academy)
딥러닝을 위한 Tensor flow(skt academy)딥러닝을 위한 Tensor flow(skt academy)
딥러닝을 위한 Tensor flow(skt academy)Tae Young Lee
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks ISang Jun Lee
 
Anomaly detection practive_using_deep_learning
Anomaly detection practive_using_deep_learningAnomaly detection practive_using_deep_learning
Anomaly detection practive_using_deep_learning도형 임
 
3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)Haesun Park
 
Tfk 6618 tensor_flow로얼굴인식구현_r10_mariocho
Tfk 6618 tensor_flow로얼굴인식구현_r10_mariochoTfk 6618 tensor_flow로얼굴인식구현_r10_mariocho
Tfk 6618 tensor_flow로얼굴인식구현_r10_mariochoMario Cho
 
발표자료 11장
발표자료 11장발표자료 11장
발표자료 11장Juhui Park
 
Machine learning bysogood
Machine learning bysogoodMachine learning bysogood
Machine learning bysogoodS.Good Kim
 
알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)
알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)
알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)HYUNJEONG KIM
 
Tensorflow for Deep Learning(SK Planet)
Tensorflow for Deep Learning(SK Planet)Tensorflow for Deep Learning(SK Planet)
Tensorflow for Deep Learning(SK Planet)Tae Young Lee
 
머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)ssusercdf17c
 
Ch.5 machine learning basics
Ch.5  machine learning basicsCh.5  machine learning basics
Ch.5 machine learning basicsJinho Lee
 
인공지능, 기계학습 그리고 딥러닝
인공지능, 기계학습 그리고 딥러닝인공지능, 기계학습 그리고 딥러닝
인공지능, 기계학습 그리고 딥러닝Jinwon Lee
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)홍배 김
 
[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가
[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가
[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가NAVER Engineering
 
Crash Course on Graphical models
Crash Course on Graphical modelsCrash Course on Graphical models
Crash Course on Graphical modelsJong Wook Kim
 
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic용진 조
 

Similaire à Naive ML Overview (20)

Siamese neural networks for one shot image recognition paper explained
Siamese neural networks for one shot image recognition paper explainedSiamese neural networks for one shot image recognition paper explained
Siamese neural networks for one shot image recognition paper explained
 
Ml
MlMl
Ml
 
딥러닝을 위한 Tensor flow(skt academy)
딥러닝을 위한 Tensor flow(skt academy)딥러닝을 위한 Tensor flow(skt academy)
딥러닝을 위한 Tensor flow(skt academy)
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks I
 
Anomaly detection practive_using_deep_learning
Anomaly detection practive_using_deep_learningAnomaly detection practive_using_deep_learning
Anomaly detection practive_using_deep_learning
 
Mahout
MahoutMahout
Mahout
 
3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)
 
Digit recognizer
Digit recognizerDigit recognizer
Digit recognizer
 
Tfk 6618 tensor_flow로얼굴인식구현_r10_mariocho
Tfk 6618 tensor_flow로얼굴인식구현_r10_mariochoTfk 6618 tensor_flow로얼굴인식구현_r10_mariocho
Tfk 6618 tensor_flow로얼굴인식구현_r10_mariocho
 
발표자료 11장
발표자료 11장발표자료 11장
발표자료 11장
 
Machine learning bysogood
Machine learning bysogoodMachine learning bysogood
Machine learning bysogood
 
알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)
알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)
알고리즘 연합캠프 세미나 1-C (알고리즘 설계와 모델링 및 수학)
 
Tensorflow for Deep Learning(SK Planet)
Tensorflow for Deep Learning(SK Planet)Tensorflow for Deep Learning(SK Planet)
Tensorflow for Deep Learning(SK Planet)
 
머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)
 
Ch.5 machine learning basics
Ch.5  machine learning basicsCh.5  machine learning basics
Ch.5 machine learning basics
 
인공지능, 기계학습 그리고 딥러닝
인공지능, 기계학습 그리고 딥러닝인공지능, 기계학습 그리고 딥러닝
인공지능, 기계학습 그리고 딥러닝
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)
 
[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가
[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가
[네이버AI해커톤]어떻게 걱정을 멈추고 베이스라인을 사랑하는 법을 배우게 되었는가
 
Crash Course on Graphical models
Crash Course on Graphical modelsCrash Course on Graphical models
Crash Course on Graphical models
 
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
 

Plus de Chul Ju Hong

Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-publicChul Ju Hong
 
Rails antipatterns
Rails antipatternsRails antipatterns
Rails antipatternsChul Ju Hong
 
게임 클론하기
게임 클론하기게임 클론하기
게임 클론하기Chul Ju Hong
 
안드로이드 세미나 2
안드로이드 세미나 2안드로이드 세미나 2
안드로이드 세미나 2Chul Ju Hong
 
안드로이드 세미나
안드로이드 세미나안드로이드 세미나
안드로이드 세미나Chul Ju Hong
 
협업 툴 사용법
협업 툴 사용법협업 툴 사용법
협업 툴 사용법Chul Ju Hong
 

Plus de Chul Ju Hong (8)

Mixture model
Mixture modelMixture model
Mixture model
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-public
 
Rails antipatterns
Rails antipatternsRails antipatterns
Rails antipatterns
 
Node.js intro
Node.js introNode.js intro
Node.js intro
 
게임 클론하기
게임 클론하기게임 클론하기
게임 클론하기
 
안드로이드 세미나 2
안드로이드 세미나 2안드로이드 세미나 2
안드로이드 세미나 2
 
안드로이드 세미나
안드로이드 세미나안드로이드 세미나
안드로이드 세미나
 
협업 툴 사용법
협업 툴 사용법협업 툴 사용법
협업 툴 사용법
 

Naive ML Overview

  • 2. 발표자 소개 홍철주 • http://blog.fegs.kr • https://github.com/FeGs • Machine Learning Newbie • SW Maestro 5th 2
  • 3. 목차 • 기계 학습 • 지도 학습 • 분류 • 회귀 • 비지도 학습 • 사례 3
  • 4. 머신러닝 개발 순서 中 • 데이터 수집 • 데이터 준비 (Data cleaning) • 데이터 분석 (Data analysis, Feature engineering) • 데이터 학습 (Modeling) • 모델 성능 평가 (Evaluation) 오늘은 이 부분을 다룹니다 4
  • 5. 용어 정의 • Machine Learning • Feature / Attribute • Target variable / Label • Training set / Testing set 5
  • 6. 기계 학습 • Supervised Learning (지도 학습) • 데이터 X에 대해 Y를 예측하는 것 • 답이 있는 문제에서 답을 예측하는 것 • Unsupervised Learning (비지도 학습) • 데이터 X는 어떻게 설명될 수 있는가 • 해석은 알아서 http://en.wikipedia.org/wiki/List_of_machine_learning_concepts 6
  • 9. 지도 학습 학습 단계 MachineFeatures Target variable Modeling 9
  • 10. 지도 학습 테스트 단계 MachineFeatures Predicted target variable predicted = model(features) 10
  • 11. 지도 학습 성능 평가 단계 Machine Training Data Features (w/o target variable) Predicted Target Variables Accuracy = Correctly Predicted Target Variables / Total Predicted Target Variables 11
  • 12. 지도 학습 성능 평가 단계 Cross Validation 교차검증 Training Data Set 1/5 Training Data Set 2/5 Training Data Set 3/5 Training Data Set 4/5 Training Data Set 5/5 Training Data Set 2/5 Training Data Set 1/5 Training Data Set 3/5 Training Data Set 4/5 Training Data Set 5/5 … Training Data Set 5/5 Training Data Set 1/5 Training Data Set 2/5 Training Data Set 4/5 Training Data Set 5/5 accuracy0 accuracy1 accuracy4 Final Accuracy = mean(accuracy0, accuracy1, …, accuracy4) Test Data로 사용 Overfitting 판단에도 도움을 준다! Why? 12
  • 13. Over/Underfitting 13 Further reading - Bias-Variance Tradeoff High VarianceHigh bias
  • 14. 지도 학습 • Classification 분류 • Target variable: Discrete value • Regression 회귀 • Target variable: Continuous value 14
  • 15. 분류 문제 예시 • 스팸 메일 분류 • 필기체 인식 • 얼굴 인식 • 문서 분류 • 음성 인식 등.. 15
  • 16. 분류 문제 • Decision Trees • Support Vector Machine • k-NN • Naive Bayes • Neural Networks 16
  • 18. Ensemble of classifier 18 • Random Forest (Ensemble learning) • ex) SVM + Logistic Regression + Random Forest 여러 분류기를 사용하는데 더 많은 분류기가 예측한 값을 최종 분류값으로 내놓음. Overfitting도 피하고 정확도도 높여보고!
  • 24. Example: MNIST (kaggle) Data : Handwritten digits image (28px * 28px, grayscale) Target variable : digit number 0 1 2 3 4 5 24
  • 25. Example: MNIST (kaggle) Features : pixel0, pixel1, …, pixel783 (28 * 28) […, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 210, 254, 253, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …] Target Variable : 0 접근 1 - 픽셀 하나하나를 Feature로 간주 25
  • 26. Example: MNIST (kaggle) […, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 210, 254, 253, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …] 784차원 공간을 생각해보자 : Method 1: k-NN Method 2: SVM Method 3: Random Forest, etc.. 784차원 공간에서 가까이 있는 좌표의 label은? 784차원 공간을 783차원 초평면으로 갈라서 분류해보면? 이 위치에 하얀 픽셀이 있고 저기엔 없으면? 어떤 방법이 가장 좋은가? 26
  • 27. Example: MNIST (kaggle) 접근 2 - 이미지 프로세싱으로 Feature를 만들어내기 End point and junctions distribution 교차점, 끝점 갯수 등을 Feature로 이용함. ex) 8은 교차점이 1개, 끝점은 0개 Feature Extraction 27
  • 28. Example: MNIST (kaggle) 높은 정확도와 Insight를 얻기 위한 시각화 Averaging Images Visualizing Random Forest 28
  • 30. 최적화 • 한 알고리즘에서 조건을 바꿔가며 성능 평가를 시행하 여 최적의 Parameter를 찾는 것 • Grid Search 등을 이용해서 찾을 수 있다. 30
  • 31. 회귀 문제 • 1, 2, 3, 다음에 올 숫자는? • 4? (d=1, 등차수열) • 5? (피보나치) • … 31
  • 32. 회귀 문제 예시 • 가격 예측 • ? 32
  • 33. 회귀 문제 • Linear Regression • (+ Ridge, Lasso) • Neural Networks • Logistic Regression 33
  • 36. 비지도 학습 • Clustering 군집화 • Association Rule Learning 연관 규칙 학습 36
  • 37. 군집화 문제 예시 37 • 비슷한 문서 찾기 • Collaborative Filitering (추천 시스템)
  • 38. 군집화 문제 38 • k-Means clustering • EM algorithm
  • 41. 연관 규칙 학습 문제 예시 41 • 연관 상품 추천 (Continuous Production) • 연관 웹페이지 추천 (Web Usage Mining) • 등등
  • 42. 연관 규칙 학습 42 • Support • Confidence • A -> B?
  • 43. 사례 분석 • 스팸 메일 분류 • 필기체 인식 • 음성 인식 • 얼굴 인식 • 상품 추천 43
  • 44. 스팸 메일 분류 접근 : Bayesian filtering 간단히 Spam / Not spam (Ham) 을 구분하는 문제 내용만으로 분류를 하는 접근 Pr(S|W) = 단어 W가 들어있을 때 스팸일 확률 Pr(W|S) = 스팸에 단어 W가 있을 확률 Pr(S) = 스팸 확률 Pr(W|H) = 햄에 단어 W가 있을 확률 Pr(H) = 햄 확률 스팸에서 W가 등장하는 횟수 / 스팸 총 단어 수 통계적으로 0.2 햄에서 W가 등장하는 횟수 / 햄 총 단어 수 통계적으로 0.8 44
  • 45. 필기체 인식 (MNIST 문제를 어떻게 풀어봤나) 접근 1: PCA + k-NN 단순히 k-NN을 쓰면 시간이 많이 소요된다. 그렇다면 차원을 낮추자! - PCA 10차원으로 낮췄을 때 : 92.6% 33차원으로 낮췄을 때 : 97.3% 5 3 8 9 56차원으로 낮췄을 때 : 97.2% 45
  • 46. 필기체 인식 (MNIST 문제를 어떻게 풀어봤나) 접근 2: CNN (Convolutional Neural Networks) 이건 다음에 46
  • 47. 음성 인식 접근 : Neural Networks 47 MFCCs Zero Crossing Rate Spectral Centroid … 등을 feature로 사용 이미지 픽셀을 쓰는거랑 비슷함
  • 48. 얼굴 인식 접근 : SVM + Sliding Window 48 얼굴 데이터로만 학습 Window 이 영역이 얼굴인가? (분류)
  • 49. 상품 추천 접근 1 : k-Means clustering 49 다른 사람도 봤던 상품이 무엇인지 알려주기 Features : product1, product2, …, productN (seen) […, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, …] Product Vector
  • 50. 상품 추천 접근 2 : EM algorithm Clustering 50 Pr(P2|P1) = 상품 P1을 봤던 사람이 상품 P2를 볼 확률 Pr(P1|P2) = 상품 P2를 봤던 사람이 상품 P1을 볼 확률 Pr(P2) = P2를 볼 확률 Pr(P1) = P1을 볼 확률 Pr(P2|P1) = Pr(P1|P2) * Pr(P2) / Pr(P1) 있을 법한 상품 조합 찾아내기
  • 51. 상품 추천 접근 3 : Apriori algorithm (Associative Rule Learning) 51 상품간 연관 규칙 발견하기 접근 4 : TF-IDF (Content-based filtering) 상품간 유사성 발견하기 …
  • 52. Tools • ipython • numpy, scipy (scientific computing) • matplotlib (ploting library) • scikit-learn (general machine learning algorithm set) • theano (for fast deep learning) • gensim (topic modeling library) 52
  • 54. EOF