[CV] Least-Median of Squares Estimation (LMedS)
·
Programming/DIP
Least-Median of Squares (LMedS) 추정법P. J. Rousseeuw가 제안한 강건 회귀 분석 (robust regression) 기법.LMedS는 이상치(outliers)에 대해 매우 강인한 특성을 가짐: 데이터 내 Outlier(이상치)의 비율이 매우 높을 때도 안정적인 regression 결과를 제공.LMedS의 정의LMedS는 다음과 같은 최적화 문제(Optimization Problem)로 정의됨:$$\hat{\theta} = \underset{\theta}{\text{argmin}}  [\text{median}_i^m ||\textbf{r}_i||^2]$$where:$\hat{\theta}$: 최적의 regression model parameter 추정치$\|\mathbf..
[CE] Linear Search, Naive Search, Brute Force Search
·
Computer/CE
Linear Search (Naive Search)The simplest solution to the Nearest Neighbor Search problem is to compute the distance from the query point to every other point in the database, keeping track of the "best so far".이 방식에서는 모든 가능한 데이터를 하나하나 비교하여, 원하는 결과를 찾는 방식.따라서, 탐색 데이터 구조를 활용하지 않고,단순히 데이터베이스의 모든 항목을 순차적으로 검사Linear Search는 Naive Search 또는 Brute Force Search라고도 불리며,$O(dN)$의 시간 복잡도를 가짐$N$ : the Cardin..
[ML] Feature Importances for Decision Tree
·
Programming/ML
이 문서는 Feature Importance를  Decision Tree에서 Gini Impurity Measure를 이용하여 계산하는 예제를 보여줌.Tree 예시 (depth = 3) [Root] (X1) [5:5] / \ Node1 Node2 (X2) (X3) [4:1] [1:4] / \ / \Leaf1 Leaf2 Leaf3 Leaf4[3:0] [1:1] [0:2] [1:2]Root 노드는 X1을 사용해 데이터를 분할.Node1은 X2를 사용해 데이터를 다시 분할.Node2는 X3을 사용해 데이터를 다시 분할.단계 1: Gini impurity measure ..
[CE] Queue
·
Computer/CE
QueueQueue는 자료구조 중 하나로 선입선출(FIFO, First-In-First-Out) 방식으로 동작함.즉, 먼저 들어온 데이터가 먼저 나가는 구조를 가짐.일상적인 예로 줄서기를 생각하면 이해하기 쉬운데, 줄의 맨 앞에 있는 사람이 먼저 나가고 새로운 사람은 줄의 맨 뒤에 서게 됨. 주요 용어 및 동작Element (요소):Queue에 저장되는 데이터의 단위. Item이라고도 부름.Enqueue (삽입):Queue의 뒤쪽에 새로운 요소를 추가하는 동작.Dequeue (삭제):Queue의 앞쪽에서 요소를 제거하는 동작.Front (첫 요소):Queue에서 가장 먼저 들어온 요소.Rear (마지막 요소):Queue에서 가장 최근에 추가된 요소. 활용 예시프로세스 스케줄링: 운영 체제에서 CPU에 작..
[LA] Eigenvalue and Eigenvector
·
.../Linear Algebra
특정 행렬 $A$는 linear transform을 의미함: $A\mathbf{x}$는 vector $\mathbf{x}$를 linear transform하는 것에 해당. Square Matrix $A$의 eigenvector와 eigenvalue는 $A$를 standard matrix로 하는 linear transform의 고유한 특성을 나타내는 요소임.주의할 점은 eigenvalue와 eigenvector의 정의로 인해 $A$는 항상 Square Matrix임.$A$가 rectangle matrix인 경우엔 Singular Value, PCA 등이 대신 사용됨: $AA^\top, A^\top A$를 응용.Definition:$$\begin{aligned}A\mathbf{x} &= \lambda \ma..
[DIP] Karhunen–Loève Transform (KLT)
·
Programming/DIP
Karhunen–Loève 변환(Karhunen–Loève Transform, KLT)은 데이터를 주요 성분으로 표현하여 효율적으로 압축하는 차원 축소 기법임.KLT는 데이터의 고유벡터(eigenvector)들의 선형 결합(linear combination)으로 데이터를 표현하는 방식으로 최적의 압축 성능을 제공함.Hotelling 변환(Hotelling Transform)이라고도 불리며, KLT의 기저(basis)는 변환 대상인 데이터에 따라 달라지는 특성을 가짐.KLT는데이터의 공분산 행렬(covariance matrix)에 대한 고유값 분해(eigenvalue decomposition, EVD)를 통해 수행되며,주요 정보는 고유값(eigenvalue)이 큰 방향의 성분에 압축됨.이 때문에 KLT는데..