db_mlp 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/db_mlp.gemspec +2 -2
- data/examples/data.rdb +0 -0
- data/examples/xor.rb +1 -1
- data/lib/modules/db.rb +1 -1
- data/test/test_db_mlp.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/db_mlp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{db_mlp}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["reddavis"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-22}
|
13
13
|
s.description = %q{Database backed Multi-Layer Perceptron Neural Network in Ruby}
|
14
14
|
s.email = %q{reddavis@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/examples/data.rdb
CHANGED
Binary file
|
data/examples/xor.rb
CHANGED
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../lib/db_mlp'
|
|
2
2
|
require 'benchmark'
|
3
3
|
|
4
4
|
db = "sqlite3://#{File.dirname(File.expand_path(__FILE__))}/data.rdb"
|
5
|
-
a = DBMLP.new(db, :hidden_layers => [2], :output_nodes => 1, :inputs => 2)
|
5
|
+
a = DBMLP.new(db, :hidden_layers => [2, 2], :output_nodes => 1, :inputs => 2)
|
6
6
|
|
7
7
|
times = Benchmark.measure do
|
8
8
|
|
data/lib/modules/db.rb
CHANGED
@@ -9,7 +9,7 @@ module DB
|
|
9
9
|
# Hidden Layers
|
10
10
|
@hidden_layers.each_with_index do |number_of_neurons, index|
|
11
11
|
layer = []
|
12
|
-
inputs = index == 0 ? @input_size : @hidden_layers[index-1]
|
12
|
+
inputs = index == 0 ? @input_size : @hidden_layers[index-1]#.size
|
13
13
|
number_of_neurons.times { layer << Neuron.new(inputs, index) }
|
14
14
|
@network << layer
|
15
15
|
layer.each {|x| x.save!}
|
data/test/test_db_mlp.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db_mlp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- reddavis
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-22 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|