Coder Social home page Coder Social logo

titanic_survival_exploration's Introduction

项目 0: 入门与基础

预测泰坦尼克号乘客幸存率

安装要求

这个项目要求使用 Python 2.7 以及安装下列python库

你还需要安装和运行 Jupyter Notebook

优达学城推荐学生安装 Anaconda,一个包含了项目需要的所有库和软件的 Python 发行版本。这里介绍了如何安装Anaconda。

如果你使用macOS系统并且对命令行比较熟悉,可以安装homebrew,以及brew版python

$ brew install python

再用下列命令安装所需要的python库

$ pip install numpy pandas matplotlib scikit-learn scipy jupyter

代码

​ 事例代码在 titanic_survival_exploration_cn.ipynb 文件中,辅助代码在 titanic_visualizations.py 文件中。尽管已经提供了一些代码帮助你上手,你还是需要补充些代码使得项目要求的功能能够成功实现。

运行

​ 在命令行中,确保当前目录为 titanic_survival_exploration/ 文件夹的最顶层(目录包含本 README 文件),运行下列命令:

$ jupyter notebook titanic_survival_exploration.ipynb

​ 这会启动 Jupyter Notebook 把项目文件打开在你的浏览器中。

对jupyter不熟悉的同学可以看一下这两个链接:

数据

​ 这个项目的数据包含在 titanic_data.csv 文件中。文件包含下列特征: ​

  • Survived:是否存活(0代表否,1代表是)
  • Pclass:社会阶级(1代表上层阶级,2代表中层阶级,3代表底层阶级)
  • Name:船上乘客的名字
  • Sex:船上乘客的性别
  • Age:船上乘客的年龄(可能存在 NaN
  • SibSp:乘客在船上的兄弟姐妹和配偶的数量
  • Parch:乘客在船上的父母以及小孩的数量
  • Ticket:乘客船票的编号
  • Fare:乘客为船票支付的费用
  • Cabin:乘客所在船舱的编号(可能存在 NaN
  • Embarked:乘客上船的港口(C 代表从 Cherbourg 登船,Q 代表从 Queenstown 登船,S 代表从 Southampton 登船)

titanic_survival_exploration's People

Contributors

nickyfoto avatar xiaoerlaigeid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.