All Projects → tangledpath → Ruby Fann

tangledpath / Ruby Fann

Licence: mit
Ruby library for interfacing with FANN (Fast Artificial Neural Network)

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Ruby Fann

Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-92%)
Mutual labels:  ai, neural-networks
Algorithms
A collection of common algorithms and data structures implemented in java, c++, and python.
Stars: ✭ 142 (-66.59%)
Mutual labels:  ai, neural-networks
Dann
Deep Neural Network Sandbox for JavaScript.
Stars: ✭ 75 (-82.35%)
Mutual labels:  ai, neural-networks
Awesome Ai Ml Dl
Awesome Artificial Intelligence, Machine Learning and Deep Learning as we learn it. Study notes and a curated list of awesome resources of such topics.
Stars: ✭ 831 (+95.53%)
Mutual labels:  ai, neural-networks
Sharpneat
SharpNEAT - Evolution of Neural Networks. A C# .NET Framework.
Stars: ✭ 273 (-35.76%)
Mutual labels:  ai, neural-networks
Riceteacatpanda
repo with challenge material for riceteacatpanda (2020)
Stars: ✭ 18 (-95.76%)
Mutual labels:  ai, neural-networks
Jsnet
Javascript/WebAssembly deep learning library for MLPs and convolutional neural networks
Stars: ✭ 126 (-70.35%)
Mutual labels:  ai, neural-networks
Ruby Statistics
Ruby gem for some statistical operations without any statistical language dependency
Stars: ✭ 67 (-84.24%)
Mutual labels:  ruby-gem, rubygems
Pluck to hash
Extend ActiveRecord pluck to return array of hashes
Stars: ✭ 275 (-35.29%)
Mutual labels:  ruby-gem, rubygems
agency-jekyll-theme
Jekyll version of the newest Agency Bootstrap theme, plus new features: Google Analytics, Markdown support, custom pages, and more!
Stars: ✭ 222 (-47.76%)
Mutual labels:  ruby-gem, rubygems
Basic reinforcement learning
An introductory series to Reinforcement Learning (RL) with comprehensive step-by-step tutorials.
Stars: ✭ 826 (+94.35%)
Mutual labels:  ai, neural-networks
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (-23.29%)
Mutual labels:  ai, neural-networks
Spacy
💫 Industrial-strength Natural Language Processing (NLP) in Python
Stars: ✭ 21,978 (+5071.29%)
Mutual labels:  ai, neural-networks
Openhabai
Train Neuronal networks to automate your home
Stars: ✭ 19 (-95.53%)
Mutual labels:  ai, neural-networks
Str metrics
Ruby gem (native extension in Rust) providing implementations of various string metrics
Stars: ✭ 68 (-84%)
Mutual labels:  ruby-gem, native
Machine Learning Flappy Bird
Machine Learning for Flappy Bird using Neural Network and Genetic Algorithm
Stars: ✭ 1,683 (+296%)
Mutual labels:  ai, neural-networks
Gem Release
Release your ruby gems with ease.
Stars: ✭ 448 (+5.41%)
Mutual labels:  ruby-gem, rubygems
Fixy
Amacımız Türkçe NLP literatüründeki birçok farklı sorunu bir arada çözebilen, eşsiz yaklaşımlar öne süren ve literatürdeki çalışmaların eksiklerini gideren open source bir yazım destekleyicisi/denetleyicisi oluşturmak. Kullanıcıların yazdıkları metinlerdeki yazım yanlışlarını derin öğrenme yaklaşımıyla çözüp aynı zamanda metinlerde anlamsal analizi de gerçekleştirerek bu bağlamda ortaya çıkan yanlışları da fark edip düzeltebilmek.
Stars: ✭ 165 (-61.18%)
Mutual labels:  ai, neural-networks
Lightnet
🌓 Bringing pjreddie's DarkNet out of the shadows #yolo
Stars: ✭ 322 (-24.24%)
Mutual labels:  ai, neural-networks
Supervisely
AI for everyone! 🎉 Neural networks, tools and a library we use in Supervisely
Stars: ✭ 332 (-21.88%)
Mutual labels:  ai, neural-networks

RubyFann

Fast AI

NN eye candy


Neural Networks in ruby

Gem Version

RubyFann, or "ruby-fann" is a ruby gem that binds to FANN (Fast Artificial Neural Network) from within a ruby/rails environment. FANN is a is a free (native) open source neural network library, which implements multilayer artificial neural networks, supporting both fully-connected and sparsely-connected networks. It is easy to use, versatile, well documented, and fast. RubyFann makes working with neural networks a breeze using ruby, with the added benefit that most of the heavy lifting is done natively.

A talk given by our friend Ethan from Big-Oh Studios at Lone Star Ruby 2013: http://confreaks.com/videos/2609-lonestarruby2013-neural-networks-with-rubyfann

Installation

Add this line to your application's Gemfile:

gem 'ruby-fann'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby-fann

Usage

First, Go here & read about FANN. You don't need to install it before using the gem, but understanding FANN will help you understand what you can do with the ruby-fann gem: http://leenissen.dk/fann/

Documentation:

ruby-fann documentation: http://tangledpath.github.io/ruby-fann/index.html

Example training & subsequent execution:

  require 'ruby-fann'
  train = RubyFann::TrainData.new(:inputs=>[[0.3, 0.4, 0.5], [0.1, 0.2, 0.3]], :desired_outputs=>[[0.7], [0.8]])
  fann = RubyFann::Standard.new(:num_inputs=>3, :hidden_neurons=>[2, 8, 4, 3, 4], :num_outputs=>1)
  fann.train_on_data(train, 1000, 10, 0.1) # 1000 max_epochs, 10 errors between reports and 0.1 desired MSE (mean-squared-error)
  outputs = fann.run([0.3, 0.2, 0.4])

Save training data to file and use it later (continued from above)

  train.save('verify.train')
  train = RubyFann::TrainData.new(:filename=>'verify.train')
  # Train again with 10000 max_epochs, 20 errors between reports and 0.01 desired MSE (mean-squared-error)
  # This will take longer:
  fann.train_on_data(train, 10000, 20, 0.01)

Save trained network to file and use it later (continued from above)

  fann.save('foo.net')
  saved_nn = RubyFann::Standard.new(:filename=>"foo.net")
  saved_nn.run([0.3, 0.2, 0.4])

Custom training using a callback method

This callback function can be called during training when using train_on_data, train_on_file or cascadetrain_on_data.

It is very useful for doing custom things during training. It is recommended to use this function when implementing custom training procedures, or when visualizing the training in a GUI etc. The args which the callback function takes is the parameters given to the train_on_data, plus an epochs parameter which tells how many epochs the training have taken so far.

The callback method should return an integer, if the callback function returns -1, the training will terminate.

The callback (training_callback) will be automatically called if it is implemented on your subclass as follows:

class MyFann < RubyFann::Standard
  def training_callback(args)
    puts "ARGS: #{args.inspect}"
    0
  end
end

A sample project using RubyFann to play tic-tac-toe

https://github.com/bigohstudios/tictactoe

Contributors

  1. Steven Miers
  2. Ole Krüger
  3. dignati
  4. Michal Pokorny
  5. Scott Li (locksley)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].