Giter Site home page Giter Site logo

noggin's Introduction

Noggin

A Neural Network written in Ruby with an objected oriented implementation. Training is done using http://en.wikipedia.org/wiki/Backpropagation and http://en.wikipedia.org/wiki/Gradient_descent.

The simple API was inspired from https://github.com/harthur/brain

network = Noggin::Network.new

network.train([
  { input: [0, 0], expected: 0 },
  { input: [0, 1], expected: 1 },
  { input: [1, 0], expected: 1 },
  { input: [1, 1], expected: 0 }
])

network.run [0, 0]  # 0.0163
network.run [0, 1]  # 0.9873
network.run [1, 0]  # 0.9702
network.run [1, 1]  # 0.0142

Installation

gem install the_noggin

Options

Noggin::Network.new( 
    training_laps: 100000, # How many propgation of errors to do when training
    learning_rate: 0.1, # How fast the network learns
    momentum: 0.2, # How much of previous weight deltas should be applied to next delta  
    hidden_layer_size: 1 , # Number of hidden layers
    hidden_layer_node_size: 2, # Number of nodes each hidden layer has
)

noggin's People

Contributors

shaw3257 avatar

Stargazers

Ruslan Sovinskyy avatar Basil Hafez avatar Alexander Emmanuel avatar Dan Ubilla avatar Erik Pearson avatar

Watchers

 avatar

Forkers

arjunmenon

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.