Kaggle竞赛 —— 泰坦尼克号(Titanic)

完整代码见 kaggle kernel 或 Github


比赛页面:https://www.kaggle.com/c/titanic





Titanic大概是kaggle上最受欢迎的项目了,有7000多支队伍参加,多年来诞生了无数关于该比赛的经验分享。正是由于前人们的无私奉献,我才能无痛完成本篇。

 

事实上kaggle上的很多kernel都聚焦于某个特定的层面(比如提取某个不为人知的特征、使用超复杂的算法、专做EDA画图之类的),当然因为这些作者本身大都是大神级别的,所以平日里喜欢钻研一些奇淫巧技。而我目前阶段更加注重一些整体流程化的方面,因此这篇提供了一个端到端的解决方案。

 

关于Titanic,这里先贴一段比赛介绍:


The sinking of the RMS Titanicis one of the most infamous shipwrecks in history.  On April 15, 1912, during her maiden voyage,the Titanic sank after colliding with an iceberg, killing 1502 out of 2224passengers and crew. This sensational tragedy shocked the internationalcommunity and led to better safety regulations for ships.

 

One of the reasons that theshipwreck led to such loss of life was that there were not enough lifeboats forthe passengers and crew. Although there was some element of luck involved insurviving the sinking, some groups of people were more likely to survive thanothers, such as women, children, and the upper-class.

 

In this challenge, we ask you tocomplete the analysis of what sorts of people were likely to survive. Inparticular, we ask you to apply the tools of machine learning to predict whichpassengers survived the tragedy.




主要是让参赛选手根据训练集中的乘客数据和存活情况进行建模,进而使用模型预测测试集中的乘客是否会存活。乘客特征总共有11个,以下列出。当然也可以根据情况自己生成新特征,这就是特征工程(featureengineering)要做的事情了。

  • PassengerId => 乘客ID
  • Pclass => 客舱等级(1/2/3等舱位)
  • Name => 乘客姓名
  • Sex => 性别
  • Age => 年龄
  • SibSp => 兄弟姐妹数/配偶数
  • Parch => 父母数/子女数
  • Ticket => 船票编号
  • Fare => 船票价格
  • Cabin => 客舱号
  • Embarked => 登船港口


总的来说Titanic和其他比赛比起来数据量算是很小的了,训练集合测试集加起来总共891+418=1309个。因为数据少,所以很容易过拟合(overfitting),一些算法如GradientBoostingTree的树的数量就不能太多,需要在调参的时候多加注意。

 

下面我先列出目录,然后挑几个关键的点说明一下:

 

1.    数据清洗(Data Cleaning)

2.    探索性可视化(Exploratory Visualization)

3.    特征工程(Feature Engineering)

4.    基本建模&评估(Basic Modeling& Evaluation)

  • 47
    点赞
  • 186
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值