Amatofrancesco99 / Titanic-Classifier

A binary classifier, using logistic regression, to predict whether a person, given its information, would have survived to the Titanic’s disaster.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Titanic-Classifier

forthebadge made-with-python ForTheBadge built-with-love

Main Goal

A binary classifier to predict whether a person would have survived, or not, to the Titanic’s disaster.

Dataset Description

Training set (710 samples), and testing set (177 samples).
Each dataset row represents a specific passenger’s information (predictors/features), such as: ticket class; gender; age; number of siblings and spouses aboard; number of parents and children aboard; passenger fare.
Finally, is also known whether the person survived or not (target variable).

Prediction

Are you interested in knowing which would have had your probability of surviving?
Change the my_info values into the analysis.py file, then run the script.

Overall Performances:

  • Training: 80.14% accuracy
  • Testing: 78.53% accuracy

Scatterplot showing the distribution of the two classes in the plane defined by the two most influential features

Class&GenderVsSurvived

As shown in the upper scatterplot, the females are more likely to survive than males, while if the ticket class is low (1st class) the probability of surviving increases.
The feature which discriminates more the probability of surviving is the gender.

About

A binary classifier, using logistic regression, to predict whether a person, given its information, would have survived to the Titanic’s disaster.

License:MIT License


Languages

Language:Python 100.0%