Ruby编写的易于使用的神经网络库:rb-brain

jopen 9年前

rb-brain是一个采用Ruby开发,易于使用于的神经网络库。Here's an example of using it to approximate the XOR function:

require 'brain'    net = Brain::NeuralNetwork.new    net.train([{input: [0, 0], output: [0]},             {input: [0, 1], output: [1]},             {input: [1, 0], output: [1]},             {input: [1, 1], output: [0]}])    output = net.run([1, 0])  # [0.948]

项目主页:http://www.open-open.com/lib/view/home/1419338239890