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 +4 -0
- data/README.txt +3 -2
- data/ext/ruby_fann/extconf.rb +1 -1
- data/ext/ruby_fann/neural_network.c +5 -0
- data/lib/ruby_fann/version.rb +1 -1
- data/neurotica1.png +0 -0
- data/neurotica2.vrml +18 -18
- data/website/index.html +8 -6
- data/website/index.txt +5 -5
- data/xor_cascade.net +2 -2
- data/xor_float.net +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
= RubyFann
|
2
|
-
Bindings to use FANN from within ruby/rails environment.
|
3
|
-
|
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
|
data/ext/ruby_fann/extconf.rb
CHANGED
@@ -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
|
{
|
data/lib/ruby_fann/version.rb
CHANGED
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
|
7
|
+
# node 8419700
|
8
8
|
Transform {
|
9
|
-
translation 6.000 46.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
|
27
|
+
# node 8417440
|
28
28
|
Transform {
|
29
|
-
translation 50.000 6.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
|
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
|
82
|
+
# node 8418480
|
83
83
|
Transform {
|
84
|
-
translation 28.000 46.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
|
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
|
137
|
+
# node 8418170
|
138
138
|
Transform {
|
139
|
-
translation 50.000 46.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
|
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
|
192
|
+
# node 8417870
|
193
193
|
Transform {
|
194
|
-
translation 72.000 46.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
|
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
|
247
|
+
# node 8417570
|
248
248
|
Transform {
|
249
|
-
translation 94.000 46.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
|
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.
|
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.
|
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
|
63
|
-
|
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’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>,
|
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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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,
|
34
|
-
connections (connected_to_neuron, weight)=(0, 1.
|
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.
|
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.
|
7
|
-
date:
|
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
|