-
CHAPTER 1. Motivations and Basics공부기록/인공지능개론 2021. 7. 6. 20:46
https://kooc.kaist.ac.kr/machinelearning1_17
KOOC
kooc.kaist.ac.kr
1.1 Motivatons
Abundance of Data
Text / Network / TimeSeries / Image
Types of Machine Learning
Supervised Learning
- You know the true value, can provide example
- Classification(분류) / Regression(Continuous Value 에측)
Unsupervised Learning
- don't know true value, cannot provide example
- Clustering, Filtering
- 군집 찾기(신문 기사들에서 주제를 10개로 요약해봐라)
- Latent image finding
1.2 MLE
Binomial Distribution
- Discrete probability distribution(이산 확률 분포)
- Bernoulli experiment라고도 불림
- Flips are i.i.d(independent, identically distributed)$P(HHTHT) = \theta\theta(1-\theta)\theta(1-\theta) = \theta^3(1-\theta)^2$
- $P(H) = \theta, P(T) = 1-\theta$
Maximum Likelihood Estimation(MLE)
- D as Data = H,H,T,H,T
- $P(D|\theta) = \theta^{a_H}(1-\theta)^{a_T}$
- Find best $\theta$ ?? → Maximum Likelihood Estimation(MLE) of $\theta$
- 관측된 데이타의 확률을 최대화하는 값 $\hat{\theta} = argmax_\theta P(D|\theta)$
MLE Calculation
- 세타 식에 로그를 씌우면, $\hat{\theta} = argmax_\theta lnP(D|\theta) \\= argmax_\theta ln\{\theta^{a_H}(1-\theta)^{a_T}\}\\=argmax_\theta \{a_Hln\theta + a_T ln(1-\theta)\}$
- 최댓값을 $\theta$에 대해 미분해서 극점을 찾으면 $\theta = \cfrac{a_H}{a_T+a_H}$이고 이것이 $\hat{\theta}$
Number of Trials
- 2/5, 3/5와 20/50, 30/50은 어떻게 다른가?
Simple Error Bound
- 에러가 줄어든다.
- $P(|\hat{\theta} - \theta^| \ge \epsilon) \le 2e^{-2N\epsilon^2}, \theta^$ = 진짜 확률
- $\epsilon$ = error bound ,$N$ = 시행 횟수
- 이것이 Probably Approximate Corret(PAC) learning이다
1.3 MAP(Maximum A Posteriori Estimation)
Incorporating Prior Knowledge
- 사전 정보를 가미한 $\theta$(Prior Knowledge, 사전정보)
- $P(\theta|D) = \cfrac{P(D|\theta)P(\theta)}{P(D)}$ → 세타가 주어졌을 때 사실일 확률
More Formula from Bayes Viewpoint
- $P(D)$는 영향받지 않는 수치기 때문에 $P(\theta|D) \propto P(D|\theta)P(\theta)$.
- $P(\theta)$= 모름. 그래서 Beta Distribution으로 뽑자
- Beta Distribution(0~1 사이 값가진 분포)
- $P(\theta) = \cfrac{\theta^{a-1}(1-\theta)^{\beta-1}}{B(\alpha, \beta)}$, $B(\alpha, \beta) = \cfrac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)}$, $\Gamma(\alpha) = (\alpha-1)!$
Maximum a Posteriori Estimation
- MLE에선 $\hat{\theta} = \cfrac{a_H}{a_H+a_T}$
- MAP에선 $\hat{\theta} = \cfrac{a_H +a-1}{a_H+a+a_T+\beta-2}$ → 많이 실행하면 알파 베타 없어지고 MLE=MAP가 됨
1.4 Probabilty and Distribution
Probability
- E1, E2라는 사건이 $\Omega$라는 현실에서 일어날 때
- $P(E)\in R,\ P(E) \ge 0,\ P(\Omega)=1$...
- 그 외 고등학교 확통 지식들...
Conditional Probability
- $\Omega$가 아니라 어떤 스코프를 지정
- $P(A|B) = \cfrac{P(A\cap B)}{P(B)}$, $P(B|A) = \cfrac{P(A|B)P(B)}{P(A)}, \\P(A)=\sum_nP(A|B_n)P(B_n)$
Probability Distribution
- 사건과 확률의 매핑
- PDF(Probability Density Function), CDF(Cumulative Distribution Function, 누적확률분포)
Normal Distribution
- long tail이 있음
Beta Distribution
- long tail이 없고 0 ~ 1 사이 → 딱 매칭 되니까 확률에 많이 사용
- $Beta(a,b), mean =\frac{a}{a+b}, variance=\frac{ab}{(a+b)^2(a+b+1)}$
Binomial Distribution
- 이항분포. Discrete 이벤트에 사용
Multinomial Distribution
- Binomial에서 2개가 아니라 여러가지 A,B,C,D,E....를 고른다면
- $Mult(P),P=<p_1,...,P_k>, mean=E(x_i)=np_i, Var(x_i)=np_i(1-p_i)$
Quiz
1
supervised learning
2
(9+7-1) / (9+7+1+5-2) = 0.75
3
$P(y|\theta)$=likelihood, $P(\theta|y)$ = posterior, $P(\theta)$ = prior knowledge, $P(y)$ = normalizing consta
'공부기록 > 인공지능개론' 카테고리의 다른 글
5주차, Support Vector Machine (0) 2022.06.09 4주차, Logistic Regression (0) 2022.06.09 3강, Naive Bayes Classifier (0) 2022.06.03 2강, 독립사건과 확률 / 확률변수의 정의 (0) 2021.07.12 CHAPTER2. Fundamentals of Machine Learning (0) 2021.07.09