Git Product home page Git Product logo

daksh-intwala / naive-bayes-classifier_with_normality_tests Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 270 KB

Gaussian Navie Bayes Classifier was applied on IRIS dataset. Different types of normality tests were used to introduce the normality concepts.

Jupyter Notebook 7.74% HTML 92.26%
machine-learning naive-bayes-classifier normality normality-test heatmap-visualization python3 jupyter-notebook exploratory-data-analysis exploratory-data-visualizations predictions

naive-bayes-classifier_with_normality_tests's Introduction

Naive-Bayes-Classifier_with_Normality_Tests

Gaussian Navie Bayes Classifier was applied on IRIS dataset. Different types of normality tests were used to introduce the normality concepts. Implementation of Gaussian Naive Bayes Model is done to demonstrate its working.

First, we need to import the libraries

Pandas, Numpy, Seaborn, Matplotlib, Sklearn, Scipy

Second, need to prepare the data

  1. Exploratory Data Analysis

    profile = ProfileReport(df, title='Profile Reports', explorative=True)

  2. Standardization : Through StandardScaler

  3. Checking Null cells

  4. Train/Test Split

Third, Normality Test *check p value according to tests

  1. Skewness - Kurtosis Test

    print(stats.kurtosis(X))

    print(stats.skew(X))

  2. Shapiro - Wilk Test

    stat, p = shapiro(X[i])

  3. Kolmogorov-Smirnov Test

    stat1, p1 = kstest(X[i], 'norm')

Fourth, Applying Gaussian Naive-Bayes Model

Model accuracy was found to be 97.7%

Fifth, Confusion Matrix & Classification Report

  1. Confusion Matrix Plot (heatmap)

    sns.heatmap(confusion_mat, annot = True)

  2. CLassification Report

Finally, Predict the outcomes

naive-bayes-classifier_with_normality_tests's People

Contributors

daksh-intwala avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.