This project compares multiple Machine Learning models on the Titanic dataset to predict passenger survival.
The goal is to evaluate different algorithms and identify the best-performing model.
- Dataset used: Titanic Dataset (from seaborn)
- Target variable:
survived - Features include:
- pclass, sex, age, sibsp, parch, fare, embarked
- Python 🐍
- NumPy
- Pandas
- Matplotlib
- Seaborn
- Scikit-learn
- Logistic Regression
- K-Nearest Neighbors (KNN)
- Gaussian Naive Bayes
- Decision Tree Classifier
- Support Vector Machine (SVM)
| Model | Accuracy |
|---|---|
| SVM | 0.83 |
| Logistic Regression | 0.80 |
| KNN | 0.79 |
| Decision Tree | ~0.78 |
| Naive Bayes | 0.77 |
Support Vector Machine (SVM) achieved the highest accuracy.
- Data Loading (Seaborn Titanic Dataset)
- Data Cleaning & Preprocessing
- Feature Encoding
- Feature Scaling
- Train-Test Split
- Model Training
- Model Evaluation (Accuracy, Confusion Matrix, Classification Report)
- Model Comparison
- Accuracy Score
- Confusion Matrix
- Precision, Recall, F1-score
- Cross-Validation
- Notebook