ICP 4 - PavankumarManchala/Python-and-Deep-Learning-Programming-ICPs GitHub Wiki

Submitted By:

Pavankumar Manchala Class Id: 22

Tasks:

  1. Correlation: The following code describes the co-relation between Sex column and Survived column

Output:

  1. Naive Bayes:

Naive Bayes classifiers are a collection of classification algorithms based on Bayes’ Theorem. It is not a single algorithm but a family of algorithms where all of them share a common principle, i.e. every pair of features being classified is independent of each other.

The Bellow code explains how the provided data is divided and used to train the naive based model to test with the remaining data. The test accuracy is being varied for each training and testing done on the same model.

Code:

Output:

  1. SVM:

SVM is a supervised machine learning algorithm which can be used for classification or regression problems. It uses a technique called the kernel trick to transform your data and then based on these transformations it finds an optimal boundary between the possible outputs. Simply put, it does some extremely complex data transformations, then figures out how to separate your data based on the labels or outputs you've defined.

The Bellow code explains how the provided data is divided and used to train the SVM to test with the remaining data. The test accuracy is being varied for each training and testing done on the same model.

Code:

Output:

  1. SVM with RBF kernel:

The Below code explains how the provided data is divided and used to train the SVM with RBF Kernel to test with the remaining data. The test accuracy is being varied for each training and testing done on the same model.

Code:

Output: