기계학습/인공지능및기계학습개론정리 9

Sampling Based Inference (Markov Chain) -작성 중

- Learn sampling based inference Understand the concep of Metropolis-Hastings Algorithm Know the mechanism of Gibbs sampling -> 머신러닝 계열에서 inference할 때 가장 많이 쓰이는 것이 Gibbs sampling (Metropolis-Hastings Algorithm의 special case) - Detour: EM Algorithm (EM 알고리즘이 강의 중에 참 여러번 나오고 언급된다. 강화학습 공부할 때에도 거의 유사한 방식으로 학습시키는 게 많다보니 중요한 개념이 확실한 것 같다) Finds the maximum likelihood solutions for models with latent ..

Sampling Based Inference(Forward/Rejection/Importance Sampling)

- Learn basic sampling method Understand the concep of Markov chain Monte Carlo Able to apply MCMC to the parameter inference of Bayesian networks Know the mechanism of rejection sampling Know the mechanism of importance sampling - Learn sampling based inference Understand the concept of Metropolis-Hastings algorithm Know the mechanism of Gibbs sampling Forward Sampling in GMM - Sample $z$ from ..

Hidden Markov Model (2. For-Backward Prob. Calculation/ Viterbi Decoding Algorithm)

Detour: Dynamic Programming - Dynamic Programming A general algorithm design technique for solving problems defined by or formulated as recurrences with overlapping sub-instances In this context, Programming == Planning - Main storyline Setting up a recurrence Relating a solution of a larger instance to solutions of some smaller instances Solve small instances once Record solutions in a table Ex..

Hidden Markov Model(1: Joint, Marginal Probability of HMM)

Main Questions on HMM - Given the topology of the bayseian network, HMM, or M $\pi$는 initial state, latent state를 정의할때 쓰이는 parameter a는 어느 state에서 다음 state로 transitional 할 때의 probability b는 어떤 특정 state에서 observation이 generated 되서 나올 probability X는 우리가 가지고 있는 관측값 - 1. Evaluation question - Given $\pi, a, b ,X$ - Find $P(X|M, \pi, a, b)$ - how much is X likely to be observed in the trained model? ..

Bayesian Network

- Graphical Model 중에서도 큰 부분을 차지하는게 bayesian network! - 베이지안 네트워크 또한 확률 변수들 사이의 관계를 표현하는 것 Bayesian Network - A graphical notation of Random variables Conditional independence To obtain a compact representation of the full joint distributions - Syntax A acyclie and directed graph (사이클이 없는 방향성이 있는 graph) A set of nodes A random variable A conditional distribution given its parents $P(X_i | Parents..

Logistic Regression + Gaussian Naive Bayes

- binomial 혹은 multinomial에 적용 가능한 확률론적 분류기(probabilitic classifier) - 로지스틱 회귀는 시그모이드의 특별한 형태 $$f(x) = \frac{1}{1+e^{-x}} $$ - 로지스틱 회귀를 역함수 형태로 만들면 로짓 함수(logit function)이라 하며, 이는 $$f(x) = log(\frac{x}{1-x}) $$ 로 표현함. - linear regression에서 첫 항을 더미변수 1로 놓았을 때, $\hat {f(x)} = X\theta$로 표현함. 여기서, logistic regression을 위한 베르누이 분포의 pmf (우리가 궁극적으로 찾아야 할 식)는 $$P(y|x) = \mu (x)^y(1-\mu (x))^{1-y}$$ 임 한편, $..

인공지능및기계학습개론 lecture2: regression 구현

구현1. linear regression¶ x의 1차항만 고려하는 선형회귀(Linear Regression) 모형 13개의 Attribute 중 첫 번째 Attribute만 Feature varaible로 활용함 (강의에서 첫 번째 항은 더미데이터처럼 1이라 한 것 기억!) $\hat \theta = argmin_{\theta}(f-\hat f)^2 ~~>> \theta = (X^TX)^{-1}X^TY$ y_est(= x_temp * θ): 위에서 구해진 theta로 도출된 예측치 In [1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set_style('whitegrid'..