• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Ruby
  • Created about 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A neural network, written in Ruby

Neural Net (in Ruby)

A feedforward neural network with resilient backpropagation (Rprop). It's ~250 loc, 100% Ruby, with no external dependencies.

This implementation trains significantly faster than ai4r's backpropagation neural network, mainly because the Rprop training algorithm implemented here is much faster than the non-batch backpropagation algorithm used in ai4r.

However, this implementation is significantly slower than ruby-fann, which wraps the FANN library, written in C. If you're looking for something production-ready, check out ruby-fann.

Examples

  • iris.rb: solves a simple classification problem: predict the species of iris flower based on sepal and petal size.
  • mpg.rb: solves a simple regression problem: predict the miles per gallon of a car based on car attributes.
  • mnist.rb: performs OCR on handwritten digits. Requires download of MNIST dataset; see instructions at top of file.

Sources and inspirations

License

MIT

More Repositories

1

kmeans-clusterer

k-means clustering in Ruby
Ruby
95
star
2

rack-host-redirect

Rack middleware to redirect legacy domains
Ruby
82
star
3

mustache.couch.js

A helper for streaming Mustache templates from CouchDB list functions
JavaScript
28
star
4

pca

Principal component analysis (PCA) in Ruby
Ruby
26
star
5

hookforward

Forward webhooks to your development app with CouchDB and NodeJS
JavaScript
19
star
6

mnist-ruby-test

Handwritten digit OCR in Ruby
Ruby
10
star
7

couchdb-rack

A Rack handler for CouchDB external processes
Ruby
8
star
8

turbochat

Swift
7
star
9

rackables

A collection of useful Rack middleware
Ruby
6
star
10

asset_bundler

A simple asset bundling solution for Sinatra/Rack apps. Adapted from asset bundling functionality in ActionPack.
JavaScript
3
star
11

arduino-cta-tracker

Display CTA train and bus arrival times on an LCD using an Arduino Yun
Python
2
star
12

carrierwave_rails23_compat

Allows Carrierwave 0.5.x to be bundled as a plugin with a Rails 2.3 app
Ruby
2
star
13

node-lambda-template

A minimal AWS Lambda template with scripts for running locally, unit testing and deploying
JavaScript
2
star
14

asset_timestamps_cache

A simple asset timestamping solution. Adapted from asset timestamping functionality in ActionPack.
2
star
15

tzinfo_completer

Contains the parts of the TZInfo gem not included in the slimmed-down version in ActiveSupport
Ruby
2
star
16

Bayes.rb

Created this as a learning exercise. May not work correctly.
Ruby
1
star
17

gbuesing.github.com

HTML
1
star
18

tinyext

Adds Object#blank?, #present?, #tap, #try and Symbol#to_proc. Backports Ruby 1.9 performance improvement to net/http
Ruby
1
star
19

duoconsole

Run tests from your Rails development console
Ruby
1
star