In this, Jupyter notebook, I used the titanic dataset in seaborn. I used basic and known machine learnin methods to predict the survival of passengers in titanic. In class we have done with decision tree and random forest when the data was scaled. So I decided to check does really help us? The answer, yes it does slightly. Table 1 shows ML models without scaled, Table 2 shows with ML models with scaling, Table 3 shows ML models with scaled data set and grid search.
Table of Contents
-
Import Libraries
-
Data Sets
-
Data Analysis
-
Data Prepocessing
- Handling Missing Values
- Converting categorical variables to numeric variables.
-
Applying Machine Learning models to the data without scaling
- Decision Tree
- Logistic Regression
- Random Forest
- Stochastic Gradient Descent
- KNN
- Gaussian Naive Bayes
- Perceptron
- SVM
- Linear SVM
- Adaptive Boosting
- XGBoost
- Which Model is the best? Table 1
-
Applying Machine Learning models to the data with scaling
- Decision Tree
- Logistic Regression
- Random Forest
- Stochastic Gradient Descent
- KNN
- Gaussian Naive Bayes
- Perceptron
- SVM
- Linear SVM
- Adaptive Boosting
- XGBoost
- Which Model is the best ? Table 2
-
ROC Curve for RF and Logistic Regression
-
Hyperparameter tuning with Grid Search and Randomized Search
-
A few models with the grid search
- SVM
- Linear SVM
- Logistic Regression
- SGD
- Decision Tree
- Random Forest
- KNN
- Ada Boost
- XG Boost
- Cat Boost
- Light GBM
- Which Model is the best ? Table 3
-
Using h2o AutoML package
-
References