Giter VIP home page Giter VIP logo

prediction-on-iris-plants-database's Introduction

Prediction on Iris Plants database

In this repository, a linear regression model is built with numpy, matplotlib and pandas to classify four features of Iris Plants. The attribute information is as below:

  1. sepal length in cm
  2. sepal width in cm
  3. petal length in cm
  4. petal width in cm
  5. class: -- Iris Setosa -- Iris Versicolour -- Iris Virginica

Two of classes are chosen to be classified: Iris_setosa and Iris_versicolor

Installation

Numpy, Matplotlib andPandas

Usage

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

Steps to build the model

  1. Load the database
df = pd.read_csv('iris.data', header=None)
  1. extract data of four features
  2. Divide the database to train and test data with 1 or -1 label
  3. Calculate the accuracy percentage before the nodel is trained
  4. Train the model with function PercentCorrect
  5. Calculate the accuracy percentage after the nodel is trained

Limitation

This is still under construction. More features will be presented in the near feature.

Example Outcome

1.Accuracy: train 100%, test 96%

2.Learning curve

Source of data

http://archive.ics.uci.edu/ml/datasets/Iris

Contriduting

Note that the kit is still under construction. Pull requests are welcome. For major changes, please contact me via the mail [email protected]

prediction-on-iris-plants-database's People

Contributors

fu-chang-kai avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.