MARS
2021-1학기, 대학에서 ‘통계적 데이터마이닝’ 수업을 듣고 공부한 바를 정리한 글입니다. 지적은 언제나 환영입니다 :)
Introduction to MARS
<MARS; Multivariate Adaptive Regression Splines> 알고리즘은 이전에 <non-parametric regression>에서 <Multi-dimensional Splines>를 살펴볼 때, high dimension에서의 문제를 해결하기 위한 대안 중 하나로 소개되었다.
<MARS>는 아래와 같은 형태의 모델을 구축한다.
\[\hat{f}(x) = \sum^k_{i=1} c_i B_i(x)\]이때, $B_i(x)$는 basis function이다. basis func. $B_i(x)$는 아래의 세 가지 형태 중 하나로 특정된다.
1. an intercept
2. a hinge function 🔥
\[h(x - a) = (x - a) \cdot I(x > a) \quad \text{or} \quad h(a - x) = (a - x) \cdot I(a > x)\]또는 좀더 간단하게 표현해
\[h_+ (x-a) = max(x-a, 0) \quad \text{or} \quad h_- (x-a) = min(x-a, 0)\]3. a product of two or more hinge functions! 🔥
Model fitting
<MARS> 모델을 fitting 하는 것은 두 가지 과정에 의해 이루어진다.
- forward pass
- backward pass
Process. Forward pass
Start with null model - just intercept
Adds basis functions in pairs to model
- choose the pair that gives the largest reduction in RSS.
// 이때, “intercept-hinge” 쌍이 선택되어, 하나의 basis func.이 들어가게 될 수도 있음!
Explores
- existing terms
- all variables
- all values of variables
Coefficients for basis are fitted with linear regression.
Process. Back pass
Terms are removed one-by-one based on “generalised cross validation; GCV”.
Image from ‘Jonathan Tuke’
MARS vs. GAM
<MARS> 모델과 <GAM> 모델의 차이점은 두 input feature 사이에 “interaction“을 고려하는지 여부이다.
<MARS>는 새로운 basis func.의 pair를 추가하면서, 모델을 fitting 한다.
반면에 <GAM>은 모델의 basis func.이 모두 independent 하다고 가정하고 모델을 fitting 한다!