feature extraction을 통한 dimensionality reduction에 대해 배움.
feature extraction의 장점.
Dimensionality reduction
Dimensionality reduction is the task of reducing the number of features in a dataset. In machine learning tasks like regression or classification, there are often too many variables to work with. These variables are also called features. The higher the number of features, the more difficult it is to model them, this is known as the curse of dimensionality.
https://neptune.ai/blog/dimensionality-reduction
하나의 data가 갖는 feature가 100개면, 그 data는 100차원 공간 안에 있는 data.
feature의 수가 너무 많아지면, 위와 같은 문제들로 인해 결과적으로 모델의 성능이 낮아짐.
본 chapter에서는 아래 3가지 dimensionality reduction 방법을 배움.
PCA: help us to identify patterns in data based on the correlation between features.
PCA의 핵심은 data를 축에 사영(projection)했을 때, 각 data(data point)들의 분산이 최대로 보존되는 data의 축(Principal Component)을 찾아 그 축으로 차원을 축소하는 것.
2차원을 기준으로 PCA는 분산이 최대인 1번째 축을 찾고, 1번째 축에 직교하며 남은 분산이 최대인 2번째 축을 찾음.
PC를 찾기 위해서는 covariance matrix(공분산 행렬)의 eigen vector(고유 벡터) 값을 찾아야 함.
PCA는 기존 data vector를 선형 변환하여 사영함. 때문에 비선형 data 분포에는 적합하지 않음.
https://seongyun-dev.tistory.com/4
https://angeloyeo.github.io/2019/07/27/PCA.html
https://www.youtube.com/watch?v=FhQm2Tc8Kic
https://excelsior-cjh.tistory.com/167
KPCA is an extension of principal component analysis (PCA) using techniques of kernel methods.
Non-linear dimensionality reduction through the use of kernels.
https://www.youtube.com/watch?v=6Et6S03Me4o&list=PLetSlH8YjIfWMdw9AuLR5ybkVvGcoG2EW&index=15
https://garden-k.medium.com/%EB%85%BC%EB%AC%B8-kernel-principal-component-analysis-and-its-applications-in-face-recognition-and-active-shape-5b868e25fac4
LDA(Linear Discriminant Analysis)는 차원 축소의 개념으로 Topic modeling에 등장하는 LDA(Latent Dirichlet Allocation)와 다름.
LDA는 data를 특정 한 축에 사영(projection)한 후, 서로 다른 2개의 클래스를 잘 구분할 수 있는 직선(linear)을 찾는 것이 목표.
LDA는 클래스를 가장 잘 구분해주는 축(직선)을 찾기 위해 클래스 간 분산(between-class scatter)과 클래스 내부 분산(within-class scatter)의 비율을 최대화하는 방식을 따름(SB / SW).
https://ratsgo.github.io/machine%20learning/2017/03/21/LDA/
PCA can be performed before LDA to regularize the problem and avoid over-fitting.
Both Need to first step, Standardize the d-dimensional dataset(standardizing the data)
https://velog.io/@chiroya/23-PCA-LDA#pca-principal-component-analysis---%EC%A3%BC%EC%84%B1%EB%B6%84-%EB%B6%84%EC%84%9D
https://stats.stackexchange.com/questions/106121/does-it-make-sense-to-combine-pca-and-lda
https://sebastianraschka.com/Articles/2014_python_lda.html
PCA +LDA.
PCA + t-SNE 활용.
PCA를 통해, feature extraction을 1차적으로 해준 후에 LDA(t-SNE)를 적용.