ICP 4 - AsharGit/Python-ICP GitHub Wiki

Welcome to the Python-ICP-4 wiki!

This ICP is an introduction to Deep Learning algorithms. The ICP was divided into 3 tasks.

Video for this ICP: https://youtu.be/uOI0CpbPKpI

The first task asks us to read a csv file about Titanic survivors and see if there is a correlation between sex and survival. The code is shown below:

Code

The output, it can be seen that there is a strong correlation between sex and survival as there was a 74% chance of survival for a female passenger as compared to 18% for a male passenger:

Output

The second task asks us to use the Naive Bayes algorithm on a dataset and then use the data set to train and test data points and see how accurate we are. The code for this is shown down here.

Code

The output:

Output

The final task is the same as the last task but with a Linear SVM algorithm, the rest of the code is the same:

Code

The output:

Output

The final conclusion that we get from using these two algorithms is that Naive Bayes produced more accurate results than Linear SVM on this dataset.