Code Monkey home page Code Monkey logo

neuralnetplayground's Introduction

NeuralNetPlayground

MATLAB FEX Minimum Version License

A MATLAB implementation of the TensorFlow Neural Networks Playground.

Description

Inspired by the TensorFlow Neural Networks Playground interface readily available online, this is a MATLAB implementation of the same Neural Network interface for using Artificial Neural Networks for regression and classification of highly non-linear data.

The interface uses the HG1 graphics system in order to be compatible with older versions of MATLAB. A secondary purpose of this project is to write a vectorized implementation of training Artificial Neural Networks with Stochastic Gradient Descent as a means of education and to demonstrate the power of MATLAB and matrices.

The goal for this framework is given randomly generated training and test data that fall into two classes that conform to certain shapes or specifications, and given the configuration of a neural network, the goal is to perform either regression or classification of this data and interactively show the results to the user, specifically a classification or regression map of the data, as well as numerical performance measures such as the training and test loss and their values plotted on a performance curve over each iteration. The architecture of the neural network is highly configurable so the results for each change in the architecture can be seen immediately.

There are two files that accompany this repo:

  • NeuralNetApp.m: The GUI that creates the interface as seen on TensorFlow Neural Networks Playground but is done completely with MATLAB GUI elements and widgets.
  • NeuralNet2.m: The class that performs the Neural Network training via Stochastic Gradient Descent. This is used by the NeuralNetApp.m app.

Compatible Versions

Debugged and tested for MATLAB R2009b or newer.

This code can only be run on versions from R2009b and onwards due to the syntax for discarding output variables from functions via (~). If you wish to use this code for older versions (without guaranteeing compatibility), you will need to replace all instances of discarding output variables with dummy variables but you'll be subject to a variety of mlint errors. This effort has not been done on our part as there is very little gain to go to even older versions and so if you desire to run this code on older versions, you will have to do so yourself.

Neural Network App

Ensure that both files NeuralNetApp.m and NeuralNet2.m are in the same directory. In the MATLAB Command Window, simply run the NeuralNetApp.m file within this directory. Assuming you are working in the directory of where you stored, type in the following and press ENTER:

>> NeuralNetApp

If you want to be explicit, you can use run and provide the path to where this file is located on your system:

>> run(fullfile('path', 'to', 'the', 'NeuralNetApp.m'));

If all goes well, you should be presented with a GUI. See here for the output from a sample run.

screenshot

Neural Network Class

The main engine before the training algorithm is seen in the NeuralNet2.m file. This is a custom class that was written and is well documented to allow a MATLAB user to use it for their purposes in future code that they write. You can type in help NeuralNet2 in the command window where this file is located on your system for a comprehensive overview on how to use this class.

Check out this page for some tips on training the neural network.

Resources

  • Docs: Documentation and description of the various parts of the app.
  • Demos: Examples and demos showing how to use the neural network class.
  • Chat: Stack Overflow MATLAB Chat Room

neuralnetplayground's People

Contributors

amroamroamro avatar rayryeng avatar

Watchers

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