전체 글(108)
-
[ML] 2. Linear Regression
선형 회귀(=linear regression)는 가장 기본적인 ML 기법이다.(정확히 설명하자면, 선형 회귀는 통계학에서 온 기법이다.) 그럼 "회귀"가 무엇을 뜻하는지부터 살펴보자! 회귀란 "여러 개의 독립변수(=입력)와 한 개의 종속변수(=출력) 간의 상관관계를 추정"하는 기법을 의미하며,선형 회귀는 "입출력 간의 상관관계를 선형으로 가정하고 추정"하는 기법을 의미한다.참고로, 회귀의 모든 변수는 연속성 변수이다. 다시 말해, 선형 회귀는 입출력 데이터를 보고, 입출력 관계를 가장 잘 표현한 선형함수($y = w_1x_1 + w_2x_2 + \cdots + w_nx_n + b$)를 찾는 것이 목표이다.즉, "최적의 $w_1, w_2, \cdots, w_n$와 $b$를 찾는 것"이 선형 회귀이다.(참고..
2024.01.30 -
[Probability] Markov Chains
1. Markov Chain Models A Markov chain model is specified by identifying: (a) the set of states $S = \{1, \cdots, m\}$. (b) transition probability matrix $P = \begin{bmatrix} p_{11} & \cdots & p_{1m} \\ \vdots & \ddots & \vdots \\ p_{m1} & \cdots & p_{mm} \end{bmatrix}$ transition probabilities $p_{ij}$는 현재 state($X_n$)가 $i$일 때, 다음 state($X_{n+1}$)가 $j$가 될 확률을 의미한다. 이때, 과거 state($X_{1}$전 $X_1$에는 ..
2024.01.19 -
[Probability] Bayesian & Likelihood
1. Bayesian Statistical Inference1.1. Terminology of Bayesian Inference $x = (x_1, \cdots, x_n)$: observation vector of $X$$p_\Theta$ or $f_\Theta$: prior distributionunknown parameter distribution $\Theta$ that was assumed before observing $x$$p_{\Theta|X}$ or $f_{\Theta|X}$: posterior distributionunknown parameter distribution $\Theta$ that was assumed after observing $x$1.2. Summary of Bayesi..
2023.12.11 -
[Probability] Law of Large Number & Central Limit Theorem
1. Markov and Chebyshev Inequalities 1.1. Markov Inequalities If a random variable $X$ can only take nonnegative values, then $$P(X \le a) \ge \frac{E[X]}{a}, \quad \text{for all } a > 0$$ Proof $$Y_a = \begin{cases} 0, & \text{if } X > a \\ a, & \text{if } X \le a \end{cases} \\ E[Y_a] = 0 \cdot Pr(X < a) + a \cdot Pr(X \le a) \rightarrow E[Y_a] = a \cdot Pr(X \le a) \\ Pr(X \le a) = \frac{E[Y_..
2023.12.11 -
내적에 대한 고찰
$\mathbf{\vec{v}}$와 $\mathbf{\vec{w}}$의 내적(dot product)는 $\lVert\mathbf{\vec{v}}\rVert \lVert\mathbf{\vec{w}}\rVert \cos \theta$이며, $\mathbf{\vec{v}}$, $\mathbf{\vec{w}}$의 내적은 ($\mathbf{\vec{v}}$가 $\mathbf{\vec{w}}$에 정사영하여 얻은 벡터의 길이)와 ($\mathbf{\vec{w}}$의 길이)를 곱한 값이다. 즉, 내적은 "정사영(=projection)"이라는 가하학적 특성을 가지고 있다. 뿐만 아니라, 내적은 신기하게도 다음과 같이 계산하여 구할 수 있다. 다시 말해, 다음과 같이 계산해도, "($\mathbf{\vec{v}}$가 $\..
2023.12.06 -
[Linear Algebra] 15. Least squares & Projection matrix + Gram-Schmidt Orthogonalization
이번 글에서는 최소 자승법(least square method)에 대해 알아볼 것이다. Problem 최소 자승법이 풀고자 하는 문제는 다음과 같다. rank($A$)=2인 $\underset{3 \times 2} A$와 $A$의 column space에 속하지 않는 3-D 벡터 $\mathbf{\vec{b}}$가 있을 때, 어떤 $A \mathbf{\vec{x}}$도 $\mathbf{\vec{b}}$와 같아질 수 없다. 즉, $A \mathbf{\vec{x}} = \mathbf{\vec{b}}$의 해는 존재하지 않는다. 그러면, 최대한 $\mathbf{\vec{b}}$와 최대한 가까운 $A \mathbf{\vec{x}}$라도 구해보자!! 다시 말해, $\mathbf{\vec{e}}(=\mathbf{\v..
2023.12.03