brains 0.2.0-java → 0.2.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b6deee0363d18d2c2d4a7ea8b4047681776566a
4
- data.tar.gz: 88dd27bf0f07c4895f0871e80dba2f7909ab02bd
3
+ metadata.gz: 967864f9d4f7eb19e59af56e381642cb6826044c
4
+ data.tar.gz: 1e4db63c7205236442cf3475cc3860eea299f76c
5
5
  SHA512:
6
- metadata.gz: 0cef015a95f1237f286606cbb439e8370920e3fc6bd9eebf2f68d03471c20383cb930495740a34dc51d5543e6560c3f739ccb61ceabeb1eed1e3d649fd60a64d
7
- data.tar.gz: 690b8de89fd2dfe1f98f9bbe9594c5af7bf28b1abb2940589433a0e304d7dd3e95dbc2420b3c68768f8a4f1fd5e72d35d1bb266e9a838edf0d4aa309a138036a
6
+ metadata.gz: 8a80e8653d4456c1f83aed602d7aa1f145508b025efaac7571b6a08753991c1f3b42504f1da1de485d84f36181b7d0e9214f52376545f3cd96c897fcf439952f
7
+ data.tar.gz: a44708442903502cc8ec7b73fe569f979fed56caa1ff9cd0ad75e658a0d41adf7bc2e290853efdd0e358a423e22d1bd4e7bc04eaae3072d0f8e1ba8ffa828667
@@ -24,6 +24,7 @@ testing_data = generate_sine_test_data(11, 20)
24
24
 
25
25
  # input sequence
26
26
  input_sequence = training_data[0][0].map { |a| a[0] }
27
+ output_sequence = training_data[0][1].map { |a| a[0] }
27
28
  test_input_sequence = testing_data[0][0].map { |a| a[0] }
28
29
  test_output_sequence = testing_data[0][1].map { |a| a[0] }
29
30
 
@@ -41,11 +42,18 @@ results.each_with_index do |a, index|
41
42
  puts "#{test_input_sequence[index]} => #{a[0]}"
42
43
  end
43
44
 
44
- result = nn.optimize_recurrent(training_data, 0.001, 100_000, 10_000 ) { |i, error|
45
+ result = nn.optimize_recurrent(training_data, 0.001, 100_000_000, 10_000 ) { |i, error|
45
46
  puts "#{i} #{error}"
46
47
  }
47
48
 
49
+ results = nn.feed(training_data[0][0])
50
+ puts " Training data"
51
+ results.each_with_index do |a, index|
52
+ puts "#{input_sequence[index]} => #{a[0]} (#{output_sequence[index]})"
53
+ end
54
+ puts " Testing data"
48
55
  results = nn.feed(testing_data[0][0])
56
+
49
57
  results.each_with_index do |a, index|
50
58
  puts "#{test_input_sequence[index]} => #{a[0]} (#{test_output_sequence[index]})"
51
59
  end
Binary file
@@ -1,3 +1,3 @@
1
1
  module Brains
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brains
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: java
6
6
  authors:
7
7
  - Joseph Emmanuel Dayo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-12 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement