Skip to content

abdullahau/data-science-main

Repository files navigation

Titanic Notebook

This notebook uses machine learning algorithms to get the best accuracy of predictions for who survived the sinking of the Titanic given the attributes in the dataset.

Setup

  • Install Python 3.12.2
    • Run python --version to ensure you have the correct version
  • and/or create a Python virtual environment with Python 3.12.2
    • If you have the right python version, simply create a new python virtual environment using the following CLI python -m venv /path/to/new/virtual/environment (I prefer placing the virtual environment inside the project folder so that VS code can automatically detect the right kernel)
  • Activate your virtual environment
  • Once your environment is activated, navigate to the folder containing the project/repo files and run the following command in the terminal to install all required packages:
    • pip install -r requirements.txt
  • In VS Code, open the "Titanic - Abdullah.ipynb" file and ensure the right kernel is connected
  • To be able to view the decision tree in the output, you will need to install the graphviz library.
    • I used graphviz version 10.0.1 (post installation you can check the version and correct installation by running dot -V in the terminal)
    • I simply used scoop on windows to install graphviz. You can use brew on Mac/Linux to install graphviz.
  • Make sure that you have the python and jupyter extention installed on VS Code.

You can compare my implementation of the notebook (Titanic - Abdullah.ipynb) with that of Claudia's and Iemejia's side-by-side.

About

Modified version of claudiaregio's Data Science Repo: https://github.com/claudiaregio/data-science

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published