Titanic为Kaggle入门赛之一,类别为二分类的监督模型。
样本数据可自行前往官网下载,csv格式(train + test)
以下为我用R对源字段数据的分析:
get data
1 |
df_train = read.csv("data/train.csv")%>% |
多图绘制
1 |
multiplot <- function(..., plotlist=NULL, file, cols=1, layout=NULL) { |
sex
1 |
sex_analysis = function(trainDf){ |
age
1 |
age_analysis = function(trainDf){ |
fare
1 |
fare_analysis = function(trainDf){ |
pclass
1 |
pclass_analysis = function(trainDf){ |
sibsp
1 |
sibsp_analysis = function(trainDf){ |
Parch
1 |
Parch_analysis = function(trainDf){ |
corr
1 |
col1 <- colorRampPalette(c("#7F0000","red","#FF7F00","yellow","white", |
近期评论