Coder Social home page Coder Social logo

excaeruleo / fruit_classification Goto Github PK

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

Personal project that trains various classifiers to identify several types of fruits in a data file, and evaluates the accuracy of each classifier.

Python 100.00%

fruit_classification's Introduction

Fruit_Classification

Personal project that trains various classifiers to identify several types of fruits in a data file, and evaluates the accuracy of each classifier.

The code is broken down into several parts, with two distinct parts: Part 1: Visualization and graphing of data to understand the data's contents

  1. Printing out the head of the file (i.e. the total number of fruits and the number of features evaluated)
  2. Printing out the number of types of fruits
  3. Plotting a bar graph of each type of fruit (Note that for this step I had trouble using seaborn's countplot and instead used matplotlib's histogram to display the count of each type of fruit
  4. Plotting a box plot to better visualize the distribution of each type of fruit
  5. Plotting a histogram of each type of fruit
  6. Plotting a scatter matrix of each feature

Part 2: Utilization of machine learning algorithms to classify the fruits

  1. Creation of training and testing sets
  2. Building of various models for machine learning algorithms a. Logistic Regression b. Decision Tree c. K-Nearest Neighbors d. Linear Discriminant Analysis e. Gaussian Naive Bayes f. Support Vector Machine
  3. Plotting of Decision Boundary of the k-NN classifier

The main libraries that are required for this project are matplotlib, numpy, pandas, collections, seaborn, pylab, and matplotlib.pyplot for the first part, and sci-kit learn for the second part.

More things to note are that I did have trouble running the program on WSL distribution with Python 3.10.8. The program only worked when I used Python 3.8.10.

Screenshots of the bar graph, box plot, histogram, scatter matrix, 4-class classification, and accuracy graph have also been provided for visual reference.

fruit_classification's People

Contributors

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