Neural Networks with Ruby
Last night I toyed around with an implementation of a very simple Artificial Neural Network that could calculate the result of simple bitwise operations (AND, OR, XOR) written in C#. Today I ported that code to Ruby and released a library called Brainz. It’s extremely simplistic, undertested and probably really inefficient, but it was really fun. If you don’t know much about neural networks, this is from the readme:
Brainz is a Artificial Neural Network (ANN) library written by Loren Segal. Neural networks are generally used in pattern recognition, signal processing and other data intensive processing problems. ANN’s benefit by not having to explicitly define the procedural steps involved in the problem, but rather by training the neural network to return the correct output for the respective inputs. This means that the same neural network can be applied to many different problem sets without much (sometimes any) modification, and therefore make a good general solution to a large set of problem domains. The drawback, however, is that these neural networks require large sets of data to be trained and this training process can be processor intensive.
AND, OR, BUT…
Want to see some code? This is also from the readme:
# Define a 2-2-1 neural network net = Brainz::Network.new(2, 2, 1) # We must train the system first 1000.times do net.train([0, 0], ) net.train([0, 1], ) net.train([1, 0], ) net.train([1, 1], ) end # Now some tests: p net.run([0, 1]).map(&:round) # =>
You might also like:
Short answer2001-06-13 12:10:13 by datamouse
An article in Rolling Stone (October 20, 1994) by Adam Miller called J. Philippe Rushton a 'professor of hate,' someone who 'takes money from an organization with a terrible past' (the Pioneer Fund, a foundation said to have an orientation toward eugenics). He is accused of being 'obsessed with intelligence and genetics' to the point of having 'racist' attitudes by Jeffrey Rosen and Charles Lane in The New Republic symposium on IQ (October 31, 1994). They single out Rushton for linking ethnocentricism to genetic factors; this in turn subjects him to the broad brush of being, along with Richard J. Herrnstein and Charles Murray, 'Neo-Nazis' Newsweek (October 24, 1994). In The Chronicle of Higher Education (October 26, 1994) critiquing Herrnstein and Murray's The Bell Curve it is clear...
Palisade's NeuralTools replaces dangerous contrast dye for brain tumour scans — RealWire
As a sophisticated neural networks tool that works directly in Microsoft Excel, NeuralTools could create accurate new predictions based on patterns in known data that were easily accessible, and simple to read. Historical magnetic values of tissue ...
Two Rutgers Seniors Awarded Gates Scholarships for Graduate Study at … — News from Rutgers
Her research there involved testing drugs that promote the division of neural embryonic stem cells. Four other Rutgers students have since ... Lambert credits Rutgers for providing options and opportunities to excel in the sciences. “I would not have ...