일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- ComputerVision
- 직장인
- Python
- 영어회화
- 머신러닝
- 코딩
- 파이썬
- C언어
- machinevision
- 머신비전
- 인공지능
- 파이썬gui
- 특수대학원
- Vision
- 초보영어
- 영어공부
- 딥러닝
- 산업대학원
- opencv
- 영어
- 3dprinter
- Ai
- 오픽
- 프로그래밍
- 대학원
- coding
- 영어기초
- 4차산업
- 석사
- 동사
- Today
- Total
미래기술연구소
Titanic Prediction_데이터 분석 본문
일단 제대로 데이터 분석을 하기 전에 캐글에서 제공되는 Data Dictionary를 살펴 보자.
SipSp나 Parch같이 변수명의 의미을 바로 알 수가 없을 때나, Categorical feature의 변수값의 의미를 얻을 때 도움이 된다.
캐글 데이터 설명부터 확인해보자
Titanic: Machine Learning from Disaster
Start here! Predict survival on the Titanic and get familiar with ML basics
www.kaggle.com
Data Dictionary
Variable | Definition | Key |
survival | Survival | 0 = No, 1 = Yes |
pclass | Ticket class | 1 = 1st, 2 = 2nd, 3 = 3rd |
sex | Sex | |
Age | Age in years | |
sibsp | # of siblings / spouses aboard the Titanic | |
parch | # of parents / children aboard the Titanic | |
ticket | Ticket number | |
fare | Passenger fare | |
cabin | Cabin number | |
embarked | Port of Embarkation | C = Cherbourg, Q = Queenstown, S = Southampton |
Variable Notes
Pclass: A proxy for socio-economic status (SES) 1st = Upper 2nd = Middle 3rd = Lower
Age: Age is fractional if less than 1. If the age is estimated, is it in the form of xx.5
SibSp: The dataset defines family relations in this way…
Sibling = brother, sister, stepbrother, stepsister
Spouse = husband, wife (mistresses and fiancés were ignored)
Parch: The dataset defines family relations in this way…
Parent = mother, father
Child = daughter, son, stepdaughter, stepson
Some children travelled only with a nanny, therefore parch=0 for them.
몇개만 정리해보면
Survived는 생존 여부 ( 0 = 사망 , 1 = 생존 / Train dataframe 에만 존재 )
Pclass는 좌석 등급
SibSp는 배우자, 현제 자매 총 인원
Parch는 부모님, 자녀 총 인원
Fare는 요금
Cabin는 객실 번호
Embarked는 탑승 선착장 C = Cherbourg, Q = Queenstown, S = Southampton
자 이제 대충 뭐가 뭔지 알았으니 데이터분석을 시작해보자
.info( ) 함수를 이용하여
한눈에 데이터의 모든 정보를 확인할수 있다
train.info ( )

자세히 보면 데이터 개수가 891개가 정상인데
Age 같은 경우 714개
Cabin 같은 경우 204 개
Embarked 는 889 개가 있는 것을 확인 할 수 있다
쉽게 말해 데이터가 없다
test.info ( )

test 데이터 또한 개수가 418개가 정상인데
Age 같은 경우 332개
Fare 같은 경우 417 개
Cabin 는 91 개가 있는 것을 확인 할 수 있다