Giter VIP home page Giter VIP logo

perceptron's Introduction

Perceptron

Two simple perceptron implementations:

  • AND function classifier (run it with python and_classifier.py)
    • In order to mimic the behavior shown in the slides, this perceptron implementation will stop the current epoch if an error is encountered and start a new epoch (after adjusting the connections weights)
  • Generic linear function classifier (run it with python linear_function_classifier.py)
    • The program will pause 1 second between each epoch to let the user observe the weights changes and the error sum accumulated during the current epoch

The linear function classifier can be run in verbose mode (default) or in non-verbose mode, in which only the perceptron's accuracy on the validation data set will be printed. This second mode is particularly useful for analyzing the perceptron's behavior based on the input data sets (training and validation)

Requirements

In case you want to recreate the charts in the charts folder you might have to install the libraries listed in requirements.txt. No libraries should be needed for running the perceptron implementation. The program should work with both python 2.x and python 3.x. To use the plotting tools Python 2.x is recommended

Generating dataset

To generate a new data set for the linear function classifier you can use:

python data_generator.py <filename> <data_set_size>

Where:

  • <filename> is the filename of the output csv file (without the .csv extension)
  • <data_set_size> is the size of the generated data set (e.g. 100)

The data generator generates data sets for the function y = 2x + 1 but you can edit it to generate data for any kind of linear function.

perceptron's People

Contributors

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