Naïve Bayes Classifier for Titanic Dataset

Uses a Multinomial Naïve Bayes model to predict passengers’ embarkation port from key demographic and fare features.

Back to All Projects

Project Overview

The project loads the Titanic CSV, fills missing values (Age, Fare, Embarked) using medians to avoid warnings, and label-encodes categorical data. It selects features (Pclass, Sex, Age, SibSp, Parch, Fare) with the target set to “Embarked.” After splitting into train/test sets, it trains a MultinomialNB classifier and evaluates performance via accuracy, confusion matrix, and classification report .

Category
Machine Learning
Completion Date
June 2024
Technologies
Python 3 Jupyter Notebook LabelEncoder train_test_split MultinomialNB metrics
File Preview (View Only)