Using raw string text for Machine Learning models
= "Natural Language Processing" : Supervised learning text tasks
Naive Bayes -> Bayes' Theorem으로 supervised learning classify

Bayes' Theorem을 Machine Learning Model로 conversion이 가능하다.


따라서, 최종 joint model(the full Naive Bayes Model)은 아래와 같이 적을 수 있음. 
Naive Bayes Model의 variation으로는 Multinomial/Gaussian/Complement/Categorical/Bernoulli 등으로 다양함.
이 중 가장 잘 이용되는 모델은 Multinomial Naive Bayes Model.
각 document에 있는 가능한 모든 단어들을 겹치지 않게 펼치고 frequency count vector를 생성한다.
Document Term Matrix(DTM) 예시 
most value: 0 (sparse함) -> document가 클수록 더 sparse해짐
표에서 [단어들: feature, 빈도수 백터: strength of feature]
희귀-> weight 증가시킴
흔함-> weight 감소시킴 (값이 0에 가까울수록 단어가 common)

예를 들어, 100개 word에서 'run' 100개면 IDF는
-> log 1 = 0