Assignment-1 Logistic Regression
About the Data
The data has been split into two groups: training set (train.csv) and test set (test.csv)
The training set should be used to build your machine learning model.
For the training set, we provide the outcome (also known as the āground truthā) for each passenger. Your model will be based on āfeaturesā like passengersā gender and class.
The test set should be used to see how well your model performs on unseen data.
Even for the test set, we are providing the ground truth for each passenger, so that you can compute the required deliverables yourself.
But it is your job to predict these outcomes also.
For each passenger in the test set, use the model you trained to predict whether or not they survived the sinking of the Titanic.
Variable Notes
pclass: A proxy for socio-economic status (SES) 1st = Upper
2nd = Middle
3rd = Lower
age: Age is fractional if less than 1. If the age is estimated, is it in the form of xx.5
sibsp: The dataset defines family relations in this way… Sibling = brother, sister, stepbrother, stepsister
Spouse = husband, wife (mistresses and fianceĢs were ignored)
parch: The dataset defines family relations in this way…
Parent = mother, father
Child = daughter, son, stepdaughter, stepson
Some children travelled only with a nanny, therefore parch=0 for them.
Deliverables
The Python Notebook containing the complete, organized and well documented code with the following statistics:
Accuracy, Losses and F1 Scores for both Testing and Training datasets.
Instructions:
Create a Google Colab / Jupyter Notebook.
Explore the relationships between the output label and features. Plots are always helpful for such kinds of analysis.
Create a Logistic Regression Model, which classifies the data into two classes (survived (1) or not- survived (0)).
(You can also try adding some polynomial features to improve the accuracy. Maybe regularized models perform better in such cases.)
Play with the learning rate and the number of iterations to achieve the least possible loss.
(It is always helpful to plot losses and accuracy against these quantities to better understand how changing them is affecting your training process.)
(I recommend using Google Colab to avoid all the installation-related issues. You donāt need to install anything. You can work right from your browser.
For more info, please go through this link: https://towardsdatascience.com/getting-started-with-google- colab-f2fff97f594c )



