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 CHANGED
@@ -1 +1 @@
1
- 0.0.3
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.3"
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-21}
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].size
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
@@ -139,7 +139,7 @@ class TestDBMLP < Test::Unit::TestCase
139
139
  assert_equal 3, a.inspect.first.last.weights.size
140
140
  end
141
141
  end
142
-
142
+
143
143
  private
144
144
 
145
145
  def set_data_variables
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.3
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-21 00:00:00 +01:00
12
+ date: 2009-10-22 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15