Skip to content

This assignment applies supervised machine learning to the classic Titanic survival prediction task. > Using structured Excel datasets for training and testing, we build classification models to predict passenger survival. > The project involves data preprocessing, feature selection

Notifications You must be signed in to change notification settings

OrelCohenTech/titanic-ml-assignment

Repository files navigation

Titanic Survival Prediction - Machine Learning Assignment

Overview

This project applies supervised machine learning techniques to predict the survival of Titanic passengers based on various features such as age, sex, passenger class, number of family members on board, fare paid, and embarkation port. The task is performed using structured Excel datasets for training and testing.

Objectives

  • Clean and preprocess the data (handle missing values, encode categorical features, scale numerical features).
  • Explore the dataset using visualizations to identify key patterns and feature distributions.
  • Train and evaluate several classification models (Logistic Regression, Random Forest, XGBoost, etc.).
  • Perform feature selection and hyperparameter tuning using GridSearchCV with stratified 5-fold cross-validation.
  • Choose the best-performing model based on macro F1-score and apply it to the test set.

Files

  • Assignment2_supervised_learning_flow.ipynb – Main notebook containing code, experiments, and results.
  • train.xlsx – Labeled training dataset.
  • test.xlsx – Unlabeled test dataset.

Tools & Libraries

  • Python (pandas, numpy, matplotlib, seaborn, scikit-learn, xgboost)
  • Jupyter Notebook

How to Use

  1. Open the notebook Assignment2_supervised_learning_flow.ipynb.
  2. Run the cells in order to load the data, preprocess it, train models, and generate predictions.
  3. Modify parameters or models as needed to test different approaches.

Authors

  • Orel Cohen
  • Oshri Halevi

About

This assignment applies supervised machine learning to the classic Titanic survival prediction task. > Using structured Excel datasets for training and testing, we build classification models to predict passenger survival. > The project involves data preprocessing, feature selection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published