전체 글(619)
-
[6] Information gain and impurity of decision tree
Decision trees are named because they are like trees in the form of class classification through certain criteria. The criteria for classifying decision trees are information gain. Information gains can be determined based on impurity. As the name suggests, impurity is an indicator of how various classes are mixed into the node. \( IG(D_p,f) = I(D_p) - \sum_{j=1}^{m}\frac{N_j}{N_p}I(D_j) \) Info..
2021.01.06 -
[6] 의사결정나무의 정보이득과 불순도
의사결정나무는 일정 기준을 통해 클래스를 분류해나가는 모양이 나무와 같다고 해서 붙여진 이름이다. 의사결정나무의 분류 기준은 정보 이득(information gain)이다. 정보 이득은 불순도를 토대로 결정지을 수 있다. 이름에서도 알 수 있듯이 불순도는 해당 노드(node)에 얼마나 다양한 클래스가 섞여있는지에 대한 지표이다. \( IG(D_p,f) = I(D_p) - \sum_{j=1}^{m}\frac{N_j}{N_p}I(D_j) \) 정보 이득 f : 분할에 사용할 특성 \(D_p\)와 \(D_j\) : 부모와 j번째 자식 노드의 데이터셋 I : 불순도 지표 \(N_p\) : 부모 노드에 있는 샘플 개수 \(N_j\) : j번째 자식 노드에 있는 샘플 개수 간단하게 설명하자면 자식 노드들의 불순도 ..
2021.01.06 -
[5] Non-linear Troubleshooting with Kernel SVM
Algorithms such as linear SVMs and regression cannot distinguish classes that are distinguished by nonlinearity. Using kernel methods using the mapping function\(\phi\) can solve nonlinear problems. Using the mapping function, the nonlinear combination of the original characteristics can be projected into a linearly differentiated high-dimensional space, where the hyperplane is distinguished and..
2021.01.04 -
[5] 커널 SVM을 활용한 비선형 문제 해결하기
선형 SVM과 회귀분석과 같은 알고리즘은 비선형으로 구별되는 클래스를 구분 짓지 못한다. 이때 매핑함수\(\phi\)를 활용한 커널 방식을 사용한다면 비선형 문제를 해결할 수 있다. 매핑 함수를 활용해 원본 특성의 비선형 조합을 선형적으로 구분되는 고차원 공간에 투영시키고 이 공간에서의 초평면을 구분한 뒤 다시 원본 특성 공간으로 돌리면 비선형 결정 경계를 구분 지을 수 있게 된다. Ex) \(\phi(x_1,x_2) = (z_1,z_2,z_3) = (x_1,x_2,x_1^2+x_2^2)\) '2차원 -> 3차원 -> 2차원'의 투영 과정을 통해 결정 경계를 정의할 수 있다. 다만 매핑 함수의 문제점은 새로운 특성을 만드는 계산 비용이 매우 비싸다는 점이다. 특히 고차원 데이터일 경우에는 계산 비용이 더..
2021.01.04 -
[4] Understand Support Vector Machine (SVM) Principles (linear)
The optimization target for SVMs is to maximize margins. Margin: The distance between the superplane (decision boundary) that separates the class and the training sample closest to this superplane. * Decision Boundary: Boundary that separates classes The decision boundaries of large margins tend to reduce generalization error. On the other hand, the decision boundaries of small margins are likel..
2020.12.31 -
[4] 서포트 벡터 머신(SVM) 원리 이해하기 (선형)
SVM의 최적화 대상은 마진을 최대화하는 것이다. 마진 : 클래스를 구분하는 초평면(결정 경계)과 이 초평면에 가장 가까운 훈련 샘플 사이의 거리 * 결정 경계 : 클래스를 구분짓는 경계 큰 마진의 결정경계는 일반화 오차가 낮아지는 경향이 있다. 반면 작은 마진의 결정경계는 과대적합되기 쉽다. 때문에 클래스를 구분짓는 경계와 이 경계와의 거리가 가장 가까운 훈련 샘플 사이의 거리가 멀도록 하는 것이 최적화의 목적이다. 다시 말해, 클래스를 잘 구분 지을 수 있는 경계를 찾는 것이 SVM의 역할이다. 결정 경계와 나란히 놓인 초평면 $$ (1) 결정 경계 W^t X = 0 $$ $$ (2) 양성 샘플쪽의 초평면 W^T X_{pos} = 1 $$ $$ (3) 음성 샘플쪽의 초평면 W^T X_{neg} = -..
2020.12.31