Skip to content

I prepare and build a logistic regression model using Python with this notebook on the Titanic dataset. Tags: Python, Logistic Regression, Titanic dataset, Data prep-rocessing, Machine learning.

License

Notifications You must be signed in to change notification settings

aibysalman/logisticRegressionOnTitanicData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Building a Logistic Regression Model on the Titanic Dataset - By Azeem Ali

If you're new to data science or just looking to expand your knowledge, building a logistic regression model on the Titanic dataset is an excellent place to start. In this post, I'll walk you through the entire process, from data preprocessing to model training and evaluation.

Data Preprocessing:

The first step in building a machine learning model is to prepare the data. In this case, we're using the Titanic dataset, which contains information about passengers on the Titanic, including whether they survived or not.

We start by dropping irrelevant columns, filling missing values, and encoding categorical variables. This step ensures that our data is in the right format for the model.

Model Training and Evaluation:

Once we have preprocessed the data, we can split it into training and testing sets. The training set is used to train the model, while the testing set is used to evaluate its performance.

We use logistic regression to build the model and evaluate its accuracy using a classification report, cross-validation scores, and a confusion matrix.

Prediction:

Finally, we can use our model to make predictions. We input a new passenger's data into the model, and it predicts the probability of the passenger surviving the Titanic disaster.

Conclusion:

Building a logistic regression model on the Titanic dataset is a great way to learn about data science and machine learning. By following the steps outlined in this post, you can create an effective and accurate model that can predict the survival of a passenger on the Titanic.

About

I prepare and build a logistic regression model using Python with this notebook on the Titanic dataset. Tags: Python, Logistic Regression, Titanic dataset, Data prep-rocessing, Machine learning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published