피쳐엔지니어링

본 포스팅에서는 Feature engineering 실습을 위해 1차적으로 가공된 타이타닉 생존자 예측 데이터를 활욯했다.데이터 로딩import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport seaborn as sns%matplotlib inlinetitanic = pd.read_csv('data/titanic.csv')titanic.info() 결측치 처리titanic.isnull().mean() 결측치를 조회해보면 Age, Cabin, Embarked라는 변수에서 결측치가 보인다. 나이는 평균으로 처리해주고, 다른 두 변수는 새로운 범주를 지정해준다. 결측치를 굳이 새로운 범주로 분리하는 가장 큰 이유는 결측치가 데이터 예측에..
xoghks_h
'피쳐엔지니어링' 태그의 글 목록