Giter Site home page Giter Site logo

devmanpreet5 / wine-99.7accuracy Goto Github PK

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

Classifies wines as red or white using various ML algorithms with up to 99.72% accuracy. Models include KNN, Logistic Regression, Naive Bayes, SVM, SVM bagging classifier and Decision Trees.

Jupyter Notebook 100.00%

wine-99.7accuracy's Introduction

Wine Classification Project

This project aims to classify wines as either red or white using various machine learning algorithms. The dataset used is the Wine dataset.

Table of Contents

Introduction

The goal of this project is to predict whether a given wine is red or white. We applied several machine learning algorithms and evaluated their performance.

Dataset

The dataset used in this project contains various features of wines, such as acidity, sugar levels, and pH. It is divided into two classes: red wine and white wine.

Preprocessing

Different preprocessing techniques were applied to the data, including imputation and scaling. The specific preprocessing steps varied for different models to optimize their performance.

Models and Results

Here are the models used and their respective results:

  1. K-Nearest Neighbors (KNN)

    • Accuracy: 99.67%
    • Hyperparameters: imputer=1, n_neighbors=3, p=1, weights=distance
    • Best Parameters: {'p': 1, 'weights': 'distance'}
    • Model: KNeighborsClassifier(n_neighbors=11, p=1, weights='distance')
  2. Logistic Regression

    • Accuracy: 97.06%
    • Hyperparameters: {'C': 10.0, 'penalty': 'l1'}
    • Model: LogisticRegression(C=10.0, max_iter=1000000, penalty='l1', solver='saga')
  3. Naive Bayes Gaussian

    • Accuracy:
      • Without Scaling: 96.88%
      • Min-Max Scaling: 97.48%
      • Min-Max Scaling + Power Transformer: 99.02%
  4. Naive Bayes Multinomial

    • Accuracy:
      • Without Scaling: 92.21%
      • With Scaling: 75.76%
  5. Naive Bayes Bernoulli

    • Accuracy:
      • Without Scaling: 77.58%
      • With Scaling: 77.62%
  6. Support Vector Machine (SVM)

    • Accuracy: 99.67%
    • Hyperparameters: {'C': 1.0, 'gamma': 1.0, 'kernel': 'rbf'}
    • Model: SVC(gamma=1.0)
  7. Decision Tree

    • Accuracy: 99.67%
  8. Bagging Classifier with Support Vector Machine (SVM)

    • Accuracy: 99.72%
    • Model: BaggingClassifier(estimator=SVC(), n_estimators=10, random_state=0)

Conclusion

The Bagging Classifier with SVM achieved the highest accuracy of 99.72% in predicting whether a wine is red or white. The preprocessing techniques such as scaling and power transformation significantly improved the performance of Naive Bayes models.

wine-99.7accuracy's People

Contributors

devmanpreet5 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.