Data Science/Basic ML

Lp space / Lebesgue spaces (L1, L2, ...)

준나이 2018. 11. 14. 09:04

* Intro to Lp

 

머신러닝을 하다보면 L1, L2라는 용어를 많이 보게 될것이다. 그 중에서 가장 대표적인 것들은 다음과 같다.

 

L1, L2 distance
L1, L2 minimisation
L1, L2 normalisation

L1, L2 regularisation

L1, L2 penalty


사실 이를 표현하는 말들은 많지만 위의 개념들 모두 동일하거나 크게 차이가 없다. L1, L2 등은 Lp space에서 파생되었으며 (L1: Lp space에서 p=1인 경우, L2: Lp space에서 p=2인 경우) 정의는 p-norm을 일반화 시킨것과 같다. (the Lp spaces are function spaces defined using a natural generalization of the p-norm for finite-dimensional vector spaces) 여기서 p값을 어떻게 잡느냐에 따라서 underfitting, overfitting을 야기시킬 수도 있다.

 


L1-norm 수식 :

\left\|{\boldsymbol }\right\|_:=\sum _^\left|x_\right|.

 

 

L2-norm 수식 :

{\displaystyle \left\|{\boldsymbol }\right\|_:={\sqrt ^+\cdots +x_^}}.}


Lp-norm 수식 :

\left\|\mathbf  \right\|_:={\bigg (}\sum _^\left|x_\right|^{\bigg )}^.



우리가 흔히 알고 있는 Manhattan distance, Euclidean distance와 L1, L2의 형태가 같음을 알 수 있다.

 

 

* L1 norm vs. L2 norm

enter image description here

 

 

 

 



https://en.wikipedia.org/wiki/Lp_space

https://en.wikipedia.org/wiki/File:L1_and_L2_balls.jpg

'Data Science > Basic ML' 카테고리의 다른 글

Distance Metrics  (3) 2018.11.13