test/neural_network/backpropagation_test.rb in ai4r-1.1 vs test/neural_network/backpropagation_test.rb in ai4r-1.2

- old
+ new

@@ -13,32 +13,34 @@ # the Mozilla Public License version 1.1 as published by the # Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt # -require File.dirname(__FILE__) + '/../../lib/neural_network/backpropagation' - +require File.dirname(__FILE__) + '/../../lib/ai4r/neural_network/backpropagation' require 'test/unit' -NeuralNetwork::Backpropagation.send(:public, *NeuralNetwork::Backpropagation.protected_instance_methods) -NeuralNetwork::Backpropagation.send(:public, *NeuralNetwork::Backpropagation.private_instance_methods) +Ai4r::NeuralNetwork::Backpropagation.send(:public, *Ai4r::NeuralNetwork::Backpropagation.protected_instance_methods) +Ai4r::NeuralNetwork::Backpropagation.send(:public, *Ai4r::NeuralNetwork::Backpropagation.private_instance_methods) -module NeuralNetwork +module Ai4r - - class BackpropagationTest < Test::Unit::TestCase - - def test_eval - #Test set 1 - net = Backpropagation.new([3, 2]) - y = net.eval([3, 2, 3]) - assert y.length == 2 - #Test set 2 - net = Backpropagation.new([2, 4, 8, 10, 7]) - y = net.eval([2, 3]) - assert y.length == 7 + module NeuralNetwork + + + class BackpropagationTest < Test::Unit::TestCase + + def test_eval + #Test set 1 + net = Backpropagation.new([3, 2]) + y = net.eval([3, 2, 3]) + assert y.length == 2 + #Test set 2 + net = Backpropagation.new([2, 4, 8, 10, 7]) + y = net.eval([2, 3]) + assert y.length == 7 + end + end end - end \ No newline at end of file