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]
network.run [0, 1]
network.run [1, 0]
network.run [1, 1]
Installation
gem install the_noggin
Options
Noggin::Network.new(
training_laps: 100000,
learning_rate: 0.1,
momentum: 0.2,
hidden_layer_size: 1 ,
hidden_layer_node_size: 2,
)