ruby-fann 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -23,3 +23,7 @@
23
23
  * Fixed rdoc to use actual parameter names
24
24
  * Minor code cleanup & symbol fixage
25
25
  * Nicer message for windows users
26
+
27
+ == 0.7.6 2008-01-14
28
+ * 1 minor enhancements
29
+ * Exception (instead of pukage) if zero-length array given on training data
data/README.txt CHANGED
@@ -1,6 +1,7 @@
1
1
  = RubyFann
2
- Bindings to use FANN from within ruby/rails environment.
3
- Requires:
2
+ Bindings to use FANN from within ruby/rails environment. Fann is a is a free open source neural network library, which implements multilayer artificial neural networks with support for both fully connected and sparsely connected networks. It is easy to use, versatile, well documented, and fast. RubyFann makes programming neural networks a breeze, with the added benefit that most of the heavy lifting natively.
3
+
4
+ = Requirements
4
5
  FANN 2.1 or greater (preferably in /usr/local/lib)
5
6
  Ruby 1.8.6 or greater.
6
7
  gnu make tools or equiv for native code in ext
@@ -1,7 +1,7 @@
1
1
  require 'mkmf'
2
2
  lib = dir_config('fann', '/usr/local')
3
3
  if !have_library("doublefann", "fann_create_standard")
4
- puts "FANN must be installed and available in /usr/local or passed in with --with-fann-dir. Windows users should use ruby compiled in Cygwin or an equivalent, such as MingW."
4
+ puts "FANN must be installed and available in /usr/local or passed in with --with-fann-dir. Windows users should use ruby compiled in Cygwin or an equivalent, such as MingW. Ruby installed with the OneClickInstaller is not sufficient."
5
5
  exit 1
6
6
  end
7
7
  #find_library("doublefann", "fann_create_standard", "/usr/local/lib")
@@ -292,6 +292,11 @@ static VALUE fann_train_data_initialize(VALUE self, VALUE hash)
292
292
  rb_raise (rb_eRuntimeError, "[desired_outputs] must be present when [inputs] used.");
293
293
  }
294
294
 
295
+ if (RARRAY(inputs)->len < 1)
296
+ {
297
+ rb_raise (rb_eRuntimeError, "[inputs/desired_outputs] must contain at least one value.");
298
+ }
299
+
295
300
  // The data is here, start constructing:
296
301
  if(RARRAY(inputs)->len != RARRAY(desired_outputs)->len)
297
302
  {
@@ -2,7 +2,7 @@ module RubyFann #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 7
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/neurotica1.png CHANGED
Binary file
data/neurotica2.vrml CHANGED
@@ -4,9 +4,9 @@ Group { children [
4
4
  scale 0.028 0.028 0.028
5
5
  children [
6
6
  Background { skyColor 1.000 1.000 1.000 }
7
- # node 8453280
7
+ # node 8419700
8
8
  Transform {
9
- translation 6.000 46.000 97.000
9
+ translation 6.000 46.000 41.000
10
10
  scale 2.000 2.000 2.000
11
11
  children [
12
12
  Transform {
@@ -24,9 +24,9 @@ Transform {
24
24
  }
25
25
  ]
26
26
  }
27
- # node 8452100
27
+ # node 8417440
28
28
  Transform {
29
- translation 50.000 6.000 94.000
29
+ translation 50.000 6.000 32.000
30
30
  scale 2.000 2.000 2.000
31
31
  children [
32
32
  Transform {
@@ -44,7 +44,7 @@ Transform {
44
44
  }
45
45
  ]
46
46
  }
47
- # edge 8453280 -> 8452100
47
+ # edge 8419700 -> 8417440
48
48
  Group { children [
49
49
  Transform {
50
50
  children [
@@ -79,9 +79,9 @@ Transform {
79
79
  translation 24.000 17.000 0.000
80
80
  }
81
81
  ] }
82
- # node 8452650
82
+ # node 8418480
83
83
  Transform {
84
- translation 28.000 46.000 47.000
84
+ translation 28.000 46.000 50.000
85
85
  scale 2.000 2.000 2.000
86
86
  children [
87
87
  Transform {
@@ -99,7 +99,7 @@ Transform {
99
99
  }
100
100
  ]
101
101
  }
102
- # edge 8452650 -> 8452100
102
+ # edge 8418480 -> 8417440
103
103
  Group { children [
104
104
  Transform {
105
105
  children [
@@ -134,9 +134,9 @@ Transform {
134
134
  translation 35.000 17.000 0.000
135
135
  }
136
136
  ] }
137
- # node 8452530
137
+ # node 8418170
138
138
  Transform {
139
- translation 50.000 46.000 3.000
139
+ translation 50.000 46.000 7.000
140
140
  scale 2.000 2.000 2.000
141
141
  children [
142
142
  Transform {
@@ -154,7 +154,7 @@ Transform {
154
154
  }
155
155
  ]
156
156
  }
157
- # edge 8452530 -> 8452100
157
+ # edge 8418170 -> 8417440
158
158
  Group { children [
159
159
  Transform {
160
160
  children [
@@ -189,9 +189,9 @@ Transform {
189
189
  translation 46.000 17.000 0.000
190
190
  }
191
191
  ] }
192
- # node 8452390
192
+ # node 8417870
193
193
  Transform {
194
- translation 72.000 46.000 25.000
194
+ translation 72.000 46.000 50.000
195
195
  scale 2.000 2.000 2.000
196
196
  children [
197
197
  Transform {
@@ -209,7 +209,7 @@ Transform {
209
209
  }
210
210
  ]
211
211
  }
212
- # edge 8452390 -> 8452100
212
+ # edge 8417870 -> 8417440
213
213
  Group { children [
214
214
  Transform {
215
215
  children [
@@ -244,9 +244,9 @@ Transform {
244
244
  translation 57.000 17.000 0.000
245
245
  }
246
246
  ] }
247
- # node 8452310
247
+ # node 8417570
248
248
  Transform {
249
- translation 94.000 46.000 91.000
249
+ translation 94.000 46.000 2.000
250
250
  scale 2.000 2.000 2.000
251
251
  children [
252
252
  Transform {
@@ -264,7 +264,7 @@ Transform {
264
264
  }
265
265
  ]
266
266
  }
267
- # edge 8452310 -> 8452100
267
+ # edge 8417570 -> 8417440
268
268
  Group { children [
269
269
  Transform {
270
270
  children [
@@ -300,5 +300,5 @@ Transform {
300
300
  }
301
301
  ] }
302
302
  ] }
303
- Viewpoint {position 1.852 0.963 6.072}
303
+ Viewpoint {position 1.852 0.963 6.035}
304
304
  ] }
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>ruby-fann</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ruby-fann"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/ruby-fann" class="numbers">0.7.4</a>
36
+ <a href="http://rubyforge.org/projects/ruby-fann" class="numbers">0.7.6</a>
37
37
  </div>
38
38
  <p><em>Bindings to use <a href="http://leenissen.dk/fann/"><span class="caps">FANN</span></a> (Fast Artificial Neural Network) from within ruby/rails environment.</em></p>
39
39
 
@@ -53,16 +53,18 @@
53
53
  <p><a href="http://leenissen.dk/fann/">http://leenissen.dk/fann/</a></p>
54
54
  </li>
55
55
  <li>Then, install ruby-fann:
56
- <pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">ruby</span><span class="punct">-</span><span class="ident">fann</span></pre></li>
56
+ <pre class='syntax'><span class="punct">[</span><span class="ident">sudo</span><span class="punct">]</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">ruby</span><span class="punct">-</span><span class="ident">fann</span></pre></li>
57
57
  </ul>
58
58
 
59
59
 
60
60
  <h2>Requirements:</h2>
61
+
62
+
61
63
  <ul>
62
- <li><span class="caps">FANN 2</span>.1 or greater (preferably in /usr/local/lib)
63
- * Ruby 1.8.6 or greater. Windows Ruby should be built natively in Cygwin/MingW. I haven&#8217;t had much luck with any native extensions and the one click installer.</li>
64
+ <li>Fann 2.1 or greater (preferably in /usr/local/lib). </li>
65
+ <li>Ruby 1.8.6 or greater. Windows Ruby should be built natively in Cygwin/MingW. I haven&#8217;t had much luck with any native extensions and the one click installer.</li>
66
+ <li>gnu make tools or equiv for native code in ext (tested on linux, mac os x, and windows with <a href="http://www.cygwin.com/">Cygwin</a>).</li>
64
67
  <li>graphviz and ruby-graphviz is required for <a href="http://ruby-fann.rubyforge.org/rdoc/classes/RubyFann/Neurotica.html">Neurotica</a> (<em>experimental</em>) graphical output.</li>
65
- <li>gnu make tools or equiv for native code in ext (tested on linux, mac os x, and windows with <a href="http://www.cygwin.com/">Cygwin</a>)</li>
66
68
  </ul>
67
69
 
68
70
 
@@ -124,7 +126,7 @@
124
126
 
125
127
  <p>Comments are welcome. Send an email to <a href="mailto:steven@7bpeople.com">Steven Miers</a> email via the <a href="http://groups.google.com/group/ruby_fann">forum</a></p>
126
128
  <p class="coda">
127
- <a href="steven@7bpeople.com">Steven Miers</a>, 21st December 2007<br>
129
+ <a href="steven@7bpeople.com">Steven Miers</a>, 8th January 2008<br>
128
130
  </p>
129
131
  </div>
130
132
 
data/website/index.txt CHANGED
@@ -12,14 +12,14 @@ h2. Installing
12
12
 
13
13
  "http://leenissen.dk/fann/":http://leenissen.dk/fann/
14
14
  * Then, install ruby-fann:
15
- <pre syntax="ruby">sudo gem install ruby-fann</pre>
15
+ <pre syntax="ruby">[sudo] gem install ruby-fann</pre>
16
16
 
17
17
  h2. Requirements:
18
18
 
19
- * FANN 2.1 or greater (preferably in /usr/local/lib)
20
- * Ruby 1.8.6 or greater. Windows Ruby should be built natively in Cygwin/MingW. I haven't had much luck with any native extensions and the one click installer.
21
- * graphviz and ruby-graphviz is required for "Neurotica":http://ruby-fann.rubyforge.org/rdoc/classes/RubyFann/Neurotica.html (_experimental_) graphical output.
22
- * gnu make tools or equiv for native code in ext (tested on linux, mac os x, and windows with "Cygwin":http://www.cygwin.com/)
19
+ * Fann 2.1 or greater (preferably in /usr/local/lib).
20
+ * Ruby 1.8.6 or greater. Windows Ruby should be built natively in Cygwin/MingW. I haven't had much luck with any native extensions and the one click installer.
21
+ * gnu make tools or equiv for native code in ext (tested on linux, mac os x, and windows with "Cygwin":http://www.cygwin.com/).
22
+ * graphviz and ruby-graphviz is required for "Neurotica":http://ruby-fann.rubyforge.org/rdoc/classes/RubyFann/Neurotica.html (_experimental_) graphical output.
23
23
 
24
24
  h2. Unit Tests
25
25
 
data/xor_cascade.net CHANGED
@@ -30,5 +30,5 @@ cascade_activation_steepnesses_count=4
30
30
  cascade_activation_steepnesses=2.50000000000000000000e-01 5.00000000000000000000e-01 7.50000000000000000000e-01 1.00000000000000000000e+00
31
31
  layer_sizes=3 1 1 1
32
32
  scale_included=0
33
- neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (3, 8, 7.50000000000000000000e-01) (4, 3, 5.00000000000000000000e-01) (5, 5, 5.00000000000000000000e-01)
34
- connections (connected_to_neuron, weight)=(0, 1.52969231315914755420e+00) (1, 1.50824598276217747284e+00) (2, 2.41220387265133409671e-02) (0, 3.28340708551594306908e-01) (1, 1.04425133310434167799e-01) (2, -6.59535845645816038996e+01) (3, 1.39189639221561134441e-01) (0, 2.68759220062898429582e-01) (1, 2.33959475563315866253e-01) (2, 4.39841832051311443230e-02) (3, 3.95917491761458038013e+01) (4, 2.40432266113240394878e-01)
33
+ neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (3, 15, 1.00000000000000000000e+00) (4, 3, 5.00000000000000000000e-01) (5, 5, 5.00000000000000000000e-01)
34
+ connections (connected_to_neuron, weight)=(0, 1.64060127614348427727e+00) (1, 1.57263750461912477085e+00) (2, -3.68301579404615997415e-04) (0, 1.07756007111791535236e-02) (1, 6.15052708190636995833e-03) (2, -5.73600239194447922841e+01) (3, 1.26449875516921987628e-02) (0, 2.33410030412561697588e-01) (1, 2.40872204847791621107e-01) (2, 2.37685570936397305708e-01) (3, 3.95914595301011544848e+01) (4, 2.38574359126598856129e-01)
data/xor_float.net CHANGED
@@ -31,4 +31,4 @@ cascade_activation_steepnesses=2.50000000000000000000e-01 5.00000000000000000000
31
31
  layer_sizes=3 4 2
32
32
  scale_included=0
33
33
  neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (3, 5, 1.00000000000000000000e+00) (3, 5, 1.00000000000000000000e+00) (3, 5, 1.00000000000000000000e+00) (0, 5, 1.00000000000000000000e+00) (4, 5, 1.00000000000000000000e+00) (0, 5, 1.00000000000000000000e+00)
34
- connections (connected_to_neuron, weight)=(0, 1.81901505141687613865e+00) (1, -1.01895817621591100455e+00) (2, 8.42863331351461964047e-01) (0, 1.57494091898020349696e+00) (1, 1.87383001014118844019e+00) (2, 2.72897195277334425612e+00) (0, 2.21361297535147816262e+00) (1, -2.18159107932092855009e+00) (2, -1.76727410199432211080e+00) (3, -4.44379486136706614019e+00) (4, 3.59005526479922210115e+00) (5, 4.23621265514612499459e+00) (6, 4.67484948162714408770e-01)
34
+ connections (connected_to_neuron, weight)=(0, 1.27441270422940866602e+00) (1, -1.22426116781974170244e+00) (2, -1.77359115369454456435e+00) (0, 1.75865469280423880605e+00) (1, 5.81083794776469098053e-01) (2, -7.07551379257807533385e-01) (0, 2.55797944565093970937e+00) (1, 2.45367366963896449406e+00) (2, 2.60478211460055675275e+00) (3, 3.76234015577947022990e+00) (4, -4.63506819515176449187e+00) (5, 4.70207528005021035966e+00) (6, -6.14161507194542544141e-01)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ruby-fann
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.5
7
- date: 2007-12-21 00:00:00 -06:00
6
+ version: 0.7.6
7
+ date: 2008-01-14 00:00:00 -06:00
8
8
  summary: Bindings to use FANN from within ruby/rails environment.
9
9
  require_paths:
10
10
  - lib