위의 내용을 간단히 정리하면 특정 class의 모든 문서(시그마부분에 해당)를 하나로 만들고 그 안에서 특정단어들이 나오는 횟수를 이용해 P(wi | cj)를 구한다.
training documents에 fantastic이라는 단어가 한번도 사용되지 않았다. 그런데 새로 주어진 문장에서는 이 단어가 사용되었다고 한다면 이전에는 한번도 나온적이 없었으므로 확률이 0이 되버리게 된다. 즉 새로운 단어에 대한 고려가 전혀 없는 것이다. 이 문제의 해결방법은 아래 그림 참조
모든 단어의 출현횟수를 1씩 늘려줌으로써 최소횟수가 0이 아닌 1이 되게된다.
우측 하단은 add alpha가 적용된 공식이다.
training doc에서 한번도 출현하지 않은 단어는 unknown word로 위와 같이 처리한다.
위의 예제는 주어진 training data를 이용해 만든 모델로 test doc의 class를 예상하는 과정이다. 오른쪽 하단의 내용은 주어진 문서 d5가 어떤 클래스인지를 비교 추측하는 것이다. 각 c , j class일 확률을 비교 한다. 이때 d5는 공통으로 들어가는 부분이므로 생략했다.
spelling correction 결과의 신뢰도에 따른 실제 어플리케이션에서 사용자에게 제시하는 방법들
이론상으로 channel model (error model) 과 language model (prior model) 의 곱으로 spelling의 맞을 확률을 구한다고는 했으나 사실 순수하게 두 값의 곱으로 결과값으로 사용하지는 않고 위의 그림처럼 람다값을 이용해 준다. 이 람다값은 test set을 이용해 통해 얻는다.
edit distace를 하는 과정에 back tracking (tracing) 작업을 추가로 함으로써 어는 부분에서 insertion이 되었는지 나중에 알수 있으며 이를 통해 alignment가 가능하게 된다.
위 그림에서 화살표가 세가지 있는경우 어느 방향으로 부터 현재값이 기인하는지 상관없다는 것을 의미한다. 맨윗줄 3의경우는 옆이나 밑에서 오기보다 대각선 하단에서 기인하는 것이 효율적인 경로이므로 이경우는 대각선방향만 선택한다. 이런 계산 과정을 하다보면 특정방향으로 부터만 기인하는 것이 효율적이 있는데 이런 경우 insertion, deletion, substitution 중 하나의 작업만 효율적이란 이야기다.
linear algebra and multivariable calculus 는 포지션에 따라 공부의 강도가 아래와 같이 달라 지게 된다.
Application-Heavy Machine Learning Positions
interviewers may still test your basic linear algebra and multivariable calculus.
R&D-Heavy Machine Learning Positions
Other roles need much more original ML research and development. You may need to translate algorithms from academic papers into working code. Or, you might research enhancements based on your business’s unique challenges.
In other words, you’ll be implementing algorithms from scratch much more often.
For these positions, mastery of both linear algebra and multivariable calculus is a must.
Step 1: Linear Algebra for Data Science
For application-heavy roles…
Khan Academy has short, practical linear algebra lessons. They cover the most important topics. (유튜브에 있는 khan academy Linear Algebra 시리즈가 구 버전인것 같은데 내용상의 차이는 없는것 같다.)
For R&D-heavy roles
MIT OpenCourseWare offers a rigorous linear algebra class. The video lectures and course materials are all included.
Khan Academy has short, practical multivariable calculus lessons. They cover the most important concepts.
For R&D-heavy roles…
MIT OpenCourseWare offers a rigorous multivariable calculus class. The video lectures and course materials are all included.
And if you only need to review:
Multivariable Calculus Review (Video) – This is quick review of multivariable calculus in the format of solving practice problems. Recommended if you’ve taken multivariable calculus before and just need a quick review.