Skip to content

Instantly share code, notes, and snippets.

@parkjoohwan
Last active February 3, 2020 08:07
Show Gist options
  • Select an option

  • Save parkjoohwan/8b6b1374d070b4b14346a59e210968ac to your computer and use it in GitHub Desktop.

Select an option

Save parkjoohwan/8b6b1374d070b4b14346a59e210968ac to your computer and use it in GitHub Desktop.
데이터 전처리

데이터 전처리 과정

학습 데이타의 각 속성의 값이 범위가 크면 머신러닝 학습이 잘 안되는 경우가 있다.

예를 들어 속성 A의 범위가 1-100이고, 속성 B의 범위가 1-10 일때

그래서 각 속성의 값의 범위를 동일하게 맞추는 작업(Feature Scaling)을 한다.

# Costom_Uniform_Train.py 

# Feature Scalling
# 0-255 사이 값만을 가진다는 것을 알기 때문에 단순히 255를 나눠도 Feature Scaling이 가능하다.
X_train = X_train.astype(float) / 255
X_test = X_test.astype(float) / 255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment