result = pd.DataFrame({'PassengerId':data_sub.index,'Survived':y_sub}) result.to_csv(r'D:\[DataSet]\1_Titanic\submission.csv', index=False) 1. 2. 3. 4.
X_sub = data_all.loc[data_sub.index][feature] #提取测试数据特征y_sub = votingC.predict(X_sub) #使用模型预测数据标签result = pd.DataFrame({'PassengerId':data_sub.index,'Survived':y_sub})result.to_csv(r'D:\[DataSet]\1_Titanic\submission.csv', index=False)...
Let's find out the confusion matrix for titanic dataset. we have our confusion matrix. How about we give it a little more character. from sklearn.utils.multiclass import unique_labels from sklearn.metrics import confusion_matrix def plot_confusion_matrix(y_true, y_pred, classes, normalize=Fa...
6. MODELING:建模 #———6 modeling:建模———# 将dataset分为train和testtrain=dataset[:train_len]test=dataset[train_len:]test.drop(labels=["Survived"],axis=1,inplace=True)# train中将features和labels分开train["Survived"]=train["Survived"].astype(int)Y_train=train["Survived"]X_train=train....
The model used in this project was built and serialized on this Kaggle kernel using the titanic dataset. Note that I only used existing modules in standard packages such as Pandas, NumPy and sklearn so as not to end up building custom modules. ...
1、Kaggle Titanic 一个Kaggle竞赛的案例,演示基本的数据转换、分析和可视化技术 agconti/kaggle-titanic ...
Titanic-dataset:泰坦尼克号数据集Kaggle醉扶**扶归 上传 JupyterNotebook Titanic-dataset:泰坦尼克号数据集Kaggle 点赞(0) 踩踩(0) 反馈 所需:1 积分 电信网络下载 ME2306-VB一款SOT23封装N-Channel场效应MOS管 2024-11-03 04:23:37 积分:1 ME2305-VB一款SOT23封装P-Channel场效应MOS管 2024-11-03 03...
https://www.kaggle.com/c/titanic The question or problem definition for Titanic Survival competition Knowing from a training set of samples listing passengers who survived or did not survive the Titanic disaster, can our model determine based on a given test dataset not containing the survival inf...
Kaggle is the world’s largest data science community with powerful tools and resources to help you achieve your data science goals.
#解压数据集 !unzip /home/aistudio/data/data31483/titanic.zip -d /home/aistudio/data/ Archive: /home/aistudio/data/data31483/titanic.zip inflating: /home/aistudio/data/gender_submission.csv inflating: /home/aistudio/data/test.csv inflating: /home/aistudio/data/train.csv In [3] #解压数...