lib/ai4r/neural_network/backpropagation.rb in ai4r-1.2 vs lib/ai4r/neural_network/backpropagation.rb in ai4r-1.3

- old
+ new

@@ -1,28 +1,5 @@ -# The utility of artificial neural network -# models lies in the fact that they can be used -# to infer a function from observations. -# This is particularly useful in applications -# where the complexity of the data or task makes the -# design of such a function by hand impractical. -# Neural Networks are being used in many businesses and applications. Their -# ability to learn by example makes them attractive in environments where -# the business rules are either not well defined or are hard to enumerate and -# define. Many people believe that Neural Networks can only solve toy problems. -# Give them a try, and let you decide if they are good enough to solve your -# needs. -# -# In this module you will find an implementation of neural networks -# using the Backpropagation is a supervised learning technique (described -# by Paul Werbos in 1974, and further developed by David E. -# Rumelhart, Geoffrey E. Hinton and Ronald J. Williams in 1986) -# -# More about neural networks and backpropagation: -# -# * http://en.wikipedia.org/wiki/Backpropagation -# * http://en.wikipedia.org/wiki/Neural_networks -# # Author:: Sergio Fierens # License:: MPL 1.1 # Project:: ai4r # Url:: http://ai4r.rubyforge.org/ # @@ -34,10 +11,32 @@ # Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt # module Ai4r + # The utility of artificial neural network + # models lies in the fact that they can be used + # to infer a function from observations. + # This is particularly useful in applications + # where the complexity of the data or task makes the + # design of such a function by hand impractical. + # Neural Networks are being used in many businesses and applications. Their + # ability to learn by example makes them attractive in environments where + # the business rules are either not well defined or are hard to enumerate and + # define. Many people believe that Neural Networks can only solve toy problems. + # Give them a try, and let you decide if they are good enough to solve your + # needs. + # + # In this module you will find an implementation of neural networks + # using the Backpropagation is a supervised learning technique (described + # by Paul Werbos in 1974, and further developed by David E. + # Rumelhart, Geoffrey E. Hinton and Ronald J. Williams in 1986) + # + # More about neural networks and backpropagation: + # + # * http://en.wikipedia.org/wiki/Backpropagation + # * http://en.wikipedia.org/wiki/Neural_networks module NeuralNetwork # = Introduction # # This is an implementation of neural networks @@ -46,10 +45,10 @@ # Rumelhart, Geoffrey E. Hinton and Ronald J. Williams in 1986) # # = How to use it # # # Create the network - # net = Backpropagation.new([4, 3, 2]) # 4 inputs + # net = Ai4r::NeuralNetwork::Backpropagation.new([4, 3, 2]) # 4 inputs # # 1 hidden layer with 3 neurons, # # 2 outputs # # Train the network # 1..upto(100) do |i| # net.train(example[i], result[i]) \ No newline at end of file