스케일링과 변환

Python으로 배우는 Machine Learning 특성 공학

Robert O'Callaghan

Data Scientist

데이터 스케일링

Python으로 배우는 Machine Learning 특성 공학

민-맥스 스케일링

MinMax 축소

Python으로 배우는 Machine Learning 특성 공학

민-맥스 스케일링

Python으로 배우는 Machine Learning 특성 공학

Python에서 민-맥스 스케일링

from sklearn.preprocessing import MinMaxScaler

scaler = MinMaxScaler()

scaler.fit(df[['Age']])

df['normalized_age'] = scaler.transform(df[['Age']])
Python으로 배우는 Machine Learning 특성 공학

표준화

Python으로 배우는 Machine Learning 특성 공학

Python에서 표준화

from sklearn.preprocessing import StandardScaler

scaler = StandardScaler()

scaler.fit(df[['Age']])

df['standardized_col'] = scaler\
                        .transform(df[['Age']])
Python으로 배우는 Machine Learning 특성 공학

로그 변환

로그 이미지

Python으로 배우는 Machine Learning 특성 공학

Python에서 로그 변환

from sklearn.preprocessing import PowerTransformer

log = PowerTransformer()

log.fit(df[['ConvertedSalary']])

df['log_ConvertedSalary'] = 
     log.transform(df[['ConvertedSalary']])
Python으로 배우는 Machine Learning 특성 공학

마무리 슬라이드

Python으로 배우는 Machine Learning 특성 공학

Preparing Video For Download...