Standardization
표준화
- 머신러닝에 사용할 여러 Dataset들이 서로 다른 분포를 갖고 있을 때,
용이한 비교를 위해 표준에 맞추어 데이터들을 통일시키는 작업을 의미한다.
- 이때, 데이터들의 평균은 0, 표준 편차를 1에 맞춘다.
Mechanism (원리)
\(\large{X_{new_i} = {X_i - \mu \over \sigma}}\)
Legend | Description |
\(\mu\) | - \(X\)의 평균 |
\(\sigma\) | - \(X\)의 표준 편차 |
- 표준화의 통계학적인 원리는 아래 포스트를 참조하자.
* Standardization (표준화) (URL)
[Statistics] Standardization | 표준화
Standardization 표준화
dad-rock.tistory.com
Implementation (구현)
* Python Scikit-Learn Library (파이썬 사이킷런 라이브러리) (URL)
[Machine Learning] Python Scikit-Learn Library | 파이썬 사이킷런 라이브러리
Python Scikit-Learn Library 파이썬 사이킷런 라이브러리 - Python 언어로 제공되는 오픈소스 머신러닝 라이브러리이다. * Scikit-learn Official Documentation (URL) scikit-learn: machine learning in Python..
dad-rock.tistory.com
* Python 3 (using Scikit-Learn Library)
# standardization.py
from sklearn.preprocessing import StandardScaler
def get_standardization(x_train, x_test):
scaler = StandardScaler()
x_train_sc = scaler.fit_transform(x_train)
x_test_sc = scaler.transform(x_test)
return x_train_sc, x_test_sc
Standardization
표준화
- 머신러닝에 사용할 여러 Dataset들이 서로 다른 분포를 갖고 있을 때,
용이한 비교를 위해 표준에 맞추어 데이터들을 통일시키는 작업을 의미한다.
- 이때, 데이터들의 평균은 0, 표준 편차를 1에 맞춘다.
Mechanism (원리)
\(\large{X_{new_i} = {X_i - \mu \over \sigma}}\)
Legend | Description |
\(\mu\) | - \(X\)의 평균 |
\(\sigma\) | - \(X\)의 표준 편차 |
- 표준화의 통계학적인 원리는 아래 포스트를 참조하자.
* Standardization (표준화) (URL)
[Statistics] Standardization | 표준화
Standardization 표준화
dad-rock.tistory.com
Implementation (구현)
* Python Scikit-Learn Library (파이썬 사이킷런 라이브러리) (URL)
[Machine Learning] Python Scikit-Learn Library | 파이썬 사이킷런 라이브러리
Python Scikit-Learn Library 파이썬 사이킷런 라이브러리 - Python 언어로 제공되는 오픈소스 머신러닝 라이브러리이다. * Scikit-learn Official Documentation (URL) scikit-learn: machine learning in Python..
dad-rock.tistory.com
* Python 3 (using Scikit-Learn Library)
# standardization.py
from sklearn.preprocessing import StandardScaler
def get_standardization(x_train, x_test):
scaler = StandardScaler()
x_train_sc = scaler.fit_transform(x_train)
x_test_sc = scaler.transform(x_test)
return x_train_sc, x_test_sc