Git Product home page Git Product logo

perceptron's Introduction

Tópicos Especiais em Sistemas Eletrônicos IV - Aprendizado de Máquina
PPGESE - Programa de Pós-Graduação em Engenharia de Sistemas Eletrônicos
UFSC - Universidade Federal de Santa Catarina

mltool

ML course work for master's. Implementation of a multilayer perceptron with the features I needed, such as:

  • Pluggable dataset parsers, with support for:
    • IRIS;
    • MNIST;
    • CSV (from course materials).
  • Support for running multiple training configurations at once;
  • Plotting of multiple trainings, with different training configurations, on the same graph;
  • Model loading and saving;
  • Includes a drawing tool for testing classifiers that operate on images.

Implementation of k-Cross Validation is not done at this time.

Dependencies

This program depends on:

  • numpy;
  • matplotlib;
  • PyQt5;
  • scikit-learn. (for comparison)

If you have python-venv installed, you can do:

$ python3 -m venv venv
$ venv/bin/pip install -r requirements.txt
$ source venv/bin/activate

Not sure how easy it is to install PyQt5 on other platforms, so it can be left out if the drawing tool is not used.

Usage

You have to specify a dataset parser name, and parameters (usually file paths). There are also flags that change the behavior fo the program:

  • Training parameters:
    • --layout -l: Comma-separated list of hidden layer sizes. Defaults to no hidden layers (simple perceptron).
    • --max-epochs -e: maximum number of training epochs
    • --batch-size -b: number of epoch instances to train in a batch
    • --error-threshold -t: Error level to consider convergence
    • --etta -n: Training speed hyperparameter
    • --momentum -m: Training momentum
    • --v-frac -v: Fraction of data to use in holdout validation. Defaults to 1/3.
  • Saving and loading:
    • --save -S: Save model to file after training
    • --load -L: Load model from file after training
  • Other options:
    • --skip-dry-run -k : Skip making epoch #0 a dry-run. (Use the noise at first.)
    • --seed -s : RNG seed to use. -1 means a random one. Defaults to a large, fixed number.
    • --plot -p : Show plots after training.

See --help for all options, or build_results.sh for some examples.

TODO

  • load and save training plot data
  • part 1 perceptron graphs and results
  • part 2 MLP graphs and results
  • stop when validation score worsens (or does not improve) ?
  • get scikit-learn impl working again

perceptron's People

Contributors

lucaspcamargo avatar

Watchers

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