Auspice by Goorm, Manage by DAVIAN @ KAIST

Lecture: Cross Validation & Dimension Reduction

2022-01-28

지금까지 간단한 데이터를 이용하여 Regression에 대한 실습을 진행하였다.
본 파트는 훈련한 모델의 성능을 높이기 위한 Cross Validation 기법과,
Dimension Reduction을 통해 특정 Feature를 선택하거나 추출하는 기법에 대한 수업을 진행하였다.

지난 학기 수업때 PCA 기법을 단지 그림과 암기로만 이해를 했었는데,
지난 주에 배운 Linear Algebra 지식을 활용하니 새로운 시점으로 이해를 하게 되었다.

Cross-Validation

  • Leave-one-out CV

LOOCV는 ex) 총 100개의 데이터가 있으면, 99개의 Train 데이터와 1개의 Test 데이터로 나눈다.
그리고 이러한 행위를 총 100번에 대해서 각 데이터들을 무조건 한 번씩 Test 데이터로 설정한다.
이는 총 100개의 acc 및 loss의 평균을 구하는 방식이다.

  • K-fold CV K-fold는 K번씩 데이터를 나누는 것이다.

스크린샷 2022-01-28 오후 12 25 03

Dimension Reduction

스크린샷 2022-01-28 오후 12 29 43

Benefits of Dimension Reduction

  • Less storage: 데이터의 차원을 줄이니 당연히 용량을 적게 먹음.
  • Faster computation: 100,000 dim vs. 10 dim vectors 결과 당연히 10개 차원의 계산 속도가 빠름.

  • Noise removal: 더 좋은 performance를 위해 pre-processing를 진행함.

  • 2D / 3D representation: Interactive visual exploration.

Two Main Techniques

==> Feature = Variable = Dimension

  1. Feature selection

Selects a subset of the original variables as reduced dimensions.

  • Widely-used criteria.
  • Typically combinatorial optimization problems.
  • greedy methods are popular.
    • Forward selection: Empty set -> Add one variable at a time.
    • Backward elimination: Entire set -> Remove one variable at a time.
  1. Feature extraction (MAIN TOPIC)

Each reduced dimension combines multiple original dimensions.

스크린샷 2022-01-28 오후 12 41 06

스크린샷 2022-01-28 오후 12 42 31

  • Represents each reduced dimension as a linear combination of original dimensions.

  • Naturally capable of mapping new data to the same space.

Principal Component Analysis (PCA)

  • Finds the axis showing the largest variation, and project all points into this axis.

  • Reduced dimensions are orthogonal.

  • Algorithm: Eigen-decomposition.

스크린샷 2022-01-28 오후 12 48 12

스크린샷 2022-01-28 오후 12 49 21


HW14 링크

댓글남기기