Skip to content

gbuesing/neural-net-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 

Repository files navigation

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

About

A neural network, written in Ruby

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages