Git Product home page Git Product logo

mfann's Introduction

Matlab bindings for FANN - The Fast Artificial Neural Network Library

** Background
From the FANN website (http://leenissen.dk/fann/wp/):

Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks. Cross-platform execution in both fixed and floating point are supported. It includes a framework for easy handling of training data sets. It is easy to use, versatile, well documented, and fast. PHP, C++, .NET, Ada, Python, Delphi, Octave, Ruby, Prolog Pure Data and Mathematica bindings are available. A reference manual accompanies the library with examples and recommendations on how to use the library. A graphical user interface is also available for the library.
FANN Matlab bindings

The Matlab Neural Network toolbox is a great piece of software but can be very slow at times. Hence the bindings for FANN. My C skills are rusty to say the least so I thought it would be a good exercise. They are pretty basic but should work fine. Note that I am only interested in regression (function approximation) so my bindings only reflect that tiny subset of the total FANN features.

** Setup

Version of the FANN library required: at least 2.1beta 

Simply run make.  The Makefile may need a little editing to fit your environtment but that should be straightforward.

Make sure the mex files are in your Matlab path and Matlab knows where to find the FANN library (e.g., see LD_LIBRARY_PATH on unix systems).

** Usage

Create a network:

  ann = createFann([2 5 3 1],connectivity)

Train a network
  
  ann = trainFann(ann,samples,values,[desired error],[max epochs])

Use a network
  
  values = testFann(ann,samples)

Where samples are the input data points and values the output values, both in column format (1 column per dimension).
Note: do not use a connectivity different from 1 for else you will get wrong results (I hope this can be fixed with the new fann library)

mfann's People

Contributors

dgorissen avatar

Watchers

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