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 +4 -4
- data/example/sine_function.rb +9 -1
- data/lib/brains/brains.jar +0 -0
- data/lib/brains/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 967864f9d4f7eb19e59af56e381642cb6826044c
|
4
|
+
data.tar.gz: 1e4db63c7205236442cf3475cc3860eea299f76c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a80e8653d4456c1f83aed602d7aa1f145508b025efaac7571b6a08753991c1f3b42504f1da1de485d84f36181b7d0e9214f52376545f3cd96c897fcf439952f
|
7
|
+
data.tar.gz: a44708442903502cc8ec7b73fe569f979fed56caa1ff9cd0ad75e658a0d41adf7bc2e290853efdd0e358a423e22d1bd4e7bc04eaae3072d0f8e1ba8ffa828667
|
data/example/sine_function.rb
CHANGED
@@ -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,
|
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
|
data/lib/brains/brains.jar
CHANGED
Binary file
|
data/lib/brains/version.rb
CHANGED
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.
|
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-
|
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
|