{"id":28399810,"url":"https://github.com/gbuesing/neural-net-ruby","last_synced_at":"2025-06-28T02:31:16.759Z","repository":{"id":22838277,"uuid":"26185477","full_name":"gbuesing/neural-net-ruby","owner":"gbuesing","description":"A neural network, written in Ruby","archived":false,"fork":false,"pushed_at":"2017-07-02T12:13:00.000Z","size":47,"stargazers_count":127,"open_issues_count":0,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-01T15:51:41.032Z","etag":null,"topics":["neural-network","rprop","ruby","rubyml"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"xinerfeixiang/linux","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbuesing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-04T19:40:53.000Z","updated_at":"2025-04-26T15:37:49.000Z","dependencies_parsed_at":"2022-07-27T03:47:00.909Z","dependency_job_id":null,"html_url":"https://github.com/gbuesing/neural-net-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gbuesing/neural-net-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbuesing%2Fneural-net-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbuesing%2Fneural-net-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbuesing%2Fneural-net-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbuesing%2Fneural-net-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbuesing","download_url":"https://codeload.github.com/gbuesing/neural-net-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbuesing%2Fneural-net-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262363860,"owners_count":23299478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neural-network","rprop","ruby","rubyml"],"created_at":"2025-06-01T08:11:01.525Z","updated_at":"2025-06-28T02:31:16.753Z","avatar_url":"https://github.com/gbuesing.png","language":"Ruby","readme":"Neural Net (in Ruby)\n===\n\nA [feedforward neural network](http://en.wikipedia.org/wiki/Feedforward_neural_network) with [resilient backpropagation](http://en.wikipedia.org/wiki/Rprop) (Rprop). It's ~250 loc, 100% Ruby, with no external dependencies.\n\nThis implementation trains significantly faster than [ai4r](https://github.com/SergioFierens/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.\n\nHowever, this implementation is significantly slower than [ruby-fann](https://github.com/tangledpath/ruby-fann), which wraps the FANN library, written in C. If you're looking for something production-ready, check out ruby-fann.\n\n\nExamples\n---\n- ```iris.rb```: solves a simple classification problem: predict the species of iris flower based on sepal and petal size.\n- ```mpg.rb```: solves a simple regression problem: predict the miles per gallon of a car based on car attributes.\n- ```mnist.rb```: performs OCR on handwritten digits. Requires download of MNIST dataset; see instructions at top of file.\n\n\nSources and inspirations\n---\n\n- [Introduction to the Math of Neural Networks](http://www.amazon.com/Introduction-Math-Neural-Networks-Heaton-ebook/dp/B00845UQL6)\n- [Neural Networks and Deep Learning](http://neuralnetworksanddeeplearning.com/)\n- [Thoughtful Machine Learning: A Test-Driven Approach](http://www.amazon.com/Thoughtful-Machine-Learning-Test-Driven-Approach/dp/1449374069)\n- [Hacker's guide to Neural Networks](http://karpathy.github.io/neuralnets/)\n- [https://github.com/harthur/brain](https://github.com/harthur/brain)\n- [The RPROP Algorithm](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.21.1417\u0026rep=rep1\u0026type=pdf)\n- [Resources for Machine Learning in Ruby](https://gist.github.com/gbuesing/865b814d312f46775cda)\n\nLicense\n---\nMIT\n","funding_links":[],"categories":["Machine Learning Libraries"],"sub_categories":["Neural networks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbuesing%2Fneural-net-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbuesing%2Fneural-net-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbuesing%2Fneural-net-ruby/lists"}