{"id":21564996,"url":"https://github.com/mahtabranjbar/titanic-project","last_synced_at":"2026-04-13T08:31:26.564Z","repository":{"id":195071522,"uuid":"691994506","full_name":"MahtabRanjbar/Titanic-project","owner":"MahtabRanjbar","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-15T10:48:28.000Z","size":425,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T21:41:28.661Z","etag":null,"topics":["data-science","machine-learning","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MahtabRanjbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-15T10:27:30.000Z","updated_at":"2023-09-15T18:08:40.000Z","dependencies_parsed_at":"2023-09-16T11:41:45.631Z","dependency_job_id":null,"html_url":"https://github.com/MahtabRanjbar/Titanic-project","commit_stats":null,"previous_names":["mahtabranjbar/titanic-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MahtabRanjbar/Titanic-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahtabRanjbar%2FTitanic-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahtabRanjbar%2FTitanic-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahtabRanjbar%2FTitanic-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahtabRanjbar%2FTitanic-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MahtabRanjbar","download_url":"https://codeload.github.com/MahtabRanjbar/Titanic-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahtabRanjbar%2FTitanic-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","machine-learning","streamlit"],"created_at":"2024-11-24T10:18:00.444Z","updated_at":"2026-04-13T08:31:26.539Z","avatar_url":"https://github.com/MahtabRanjbar.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Predicting the Survival of Titanic Passengers\nThe sinking of the Titanic is one of the most infamous shipwrecks in history.\nOn April 15, 1912, during her maiden voyage, the widely considered “unsinkable” RMS\nTitanic sank after colliding with an iceberg. Unfortunately, there weren’t enough lifeboats\nfor everyone onboard, resulting in the death of 1502 out of 2224 passengers and crew.\nWhile there was some element of luck involved in surviving, it seems some groups of\npeople were more likely to survive than others. Let's find out the factors which help to\nsurvive.\nThe Titanic dataset contains information about the passengers on board the Titanic,\nincluding their age, gender, and ticket class, among other features. In this project, we\nused a Multi-Layer Perceptron (MLP) neural network to make predictions on this\ndataset. We explored different configurations of MLPs with varying numbers of layers\nand neurons per layer, as well as different optimizers and learning rates. Our goal was to\nfind the best model configuration that maximizes the accuracy of our predictions\n\n-----\n## Table of Contents\n1. [Dataset Information](#dataset-information)\n2. [Exploratory Data Analysis](#exploratory-data-analysis)\n3. [Data Preparation](#data-preparation)\n4. [Model Selection](#model-selection)\n5. [Model Evaluation](#model-evaluation)\n6. [Conclusion](#conclusion)\n---\n## Dataset Information:\nThe dataset contains 891 records in below format :\n\n![model](./images/dataset-overview.png)\n\nHere is a brief summary of the features included in the Titanic dataset:\n- **PassengerId:** unique identifier for each passenger\n- **Survived:** whether or not a passenger survived (0 = no, 1 = yes)\n- **Pclass:** ticket class (1 = first class, 2 = second class, 3 = third class)\n-  **Name:** name of passenger\n-  **Sex:** gender of passenger\n-  **Age:** age of passenger\n-  **SibSp:** number of siblings/spouses aboard the Titanic\n-  **Parch:** number of parents/children aboard the Titanic\n-  **Ticket:** ticket number\n- **Fare:** price of ticket\n- **Cabin:** cabin number\n- **Embarked:** port of embarkation (C = Cherbourg, Q = Queenstown, S =\nSouthampton)\n\n---\n## Exploratory Data Analysis\nWe conducted exploratory data analysis to gain insights into the dataset. We plotted\nvarious charts to visualize the relationship between different features and survival\nstatus. We observed that women had a higher chance of survival. Additionally,\npassengers in higher ticket classes also had a higher chance of survival. Plots and their\ninterpretation can be found in the code file.\n\n---\n## Data Preparation\nWe started by loading the Titanic dataset into a pandas DataFrame and performing\nsome basic data cleaning and preprocessing steps. This included filling in missing\nvalues, encoding categorical variables, and scaling numerical features.\nWe split the dataset into training and testing sets, with a 80/20 split, respectively.\n\n---\n## Model Selection\nWe explored four different configurations of MLP models, each with a varying number of\nlayers and neurons per layer. For each model configuration, we trained the model with\nsix different optimizers and learning rates.\n\n---\n## Model Evaluation\nWe evaluated the performance of each model by computing its accuracy score, f1\nscore, and confusion matrix on the testing set. We also computed the precision and\nrecall scores for each model configuration. Here is the Result:\n\n![model](./images/model-result.png)\n### Confusion Matrix for best model:\n![confusion-matrix](./images/confusion_matrix.png)\n\n---\n## Conclusion\nIn conclusion, we successfully used an MLP neural network to predict survival on the\nTitanic dataset. We explored different model configurations and optimizers and learning\nrates, and found the best model configuration to be a 3-layer MLP with 64, 32, 16\nneurons per layer wich optimized by SGD with learning rate 0.01. Our best model\nachieved an accuracy of 81% on the testing set.\nFurther improvements to this project could include exploring more advanced machine\nlearning algorithms, such as ensemble methods or gradient boosting, and performing\nmore extensive hyperparameter tuning to further improve the accuracy of our\npredictions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahtabranjbar%2Ftitanic-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahtabranjbar%2Ftitanic-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahtabranjbar%2Ftitanic-project/lists"}