ruby-fann 0.7.9 → 0.7.10
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.
- data/History.txt +5 -0
- data/ext/ruby_fann/neural_network.c +10 -10
- data/lib/ruby_fann/version.rb +1 -1
- data/neurotica1.png +0 -0
- data/neurotica2.vrml +18 -18
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/txt2html +0 -0
- data/website/index.html +1 -1
- data/xor_cascade.net +2 -2
- data/xor_float.net +1 -1
- metadata +14 -5
data/History.txt
CHANGED
@@ -156,14 +156,14 @@ static void fann_mark (struct fann* ann){}
|
|
156
156
|
static void fann_free (struct fann* ann)
|
157
157
|
{
|
158
158
|
fann_destroy(ann);
|
159
|
-
|
159
|
+
// ("Destroyed FANN network [%d].\n", ann);
|
160
160
|
}
|
161
161
|
|
162
162
|
// Free memory associated with FANN Training data:
|
163
163
|
static void fann_training_data_free (struct fann_train_data* train_data)
|
164
164
|
{
|
165
165
|
fann_destroy_train(train_data);
|
166
|
-
printf("Destroyed Training data [%d].\n", train_data);
|
166
|
+
// printf("Destroyed Training data [%d].\n", train_data);
|
167
167
|
}
|
168
168
|
|
169
169
|
// Create wrapper, but don't allocate anything...do that in
|
@@ -247,7 +247,7 @@ static VALUE fann_initialize(VALUE self, VALUE hash)
|
|
247
247
|
VALUE num_inputs = rb_hash_aref(hash, ID2SYM(rb_intern("num_inputs")));
|
248
248
|
VALUE num_outputs = rb_hash_aref(hash, ID2SYM(rb_intern("num_outputs")));
|
249
249
|
VALUE hidden_neurons = rb_hash_aref(hash, ID2SYM(rb_intern("hidden_neurons")));
|
250
|
-
printf("initializing\n\n\n");
|
250
|
+
// printf("initializing\n\n\n");
|
251
251
|
struct fann* ann;
|
252
252
|
if (TYPE(filename)==T_STRING)
|
253
253
|
{
|
@@ -255,7 +255,7 @@ static VALUE fann_initialize(VALUE self, VALUE hash)
|
|
255
255
|
// train_data = fann_read_train_from_file(StringValuePtr(filename));
|
256
256
|
// DATA_PTR(self) = train_data;
|
257
257
|
ann = fann_create_from_file(StringValuePtr(filename));
|
258
|
-
printf("Created RubyFann::Standard [%d] from file [%s].\n", ann, StringValuePtr(filename));
|
258
|
+
// printf("Created RubyFann::Standard [%d] from file [%s].\n", ann, StringValuePtr(filename));
|
259
259
|
}
|
260
260
|
else if(rb_obj_is_kind_of(self, m_rb_fann_shortcut_class))
|
261
261
|
{
|
@@ -265,7 +265,7 @@ static VALUE fann_initialize(VALUE self, VALUE hash)
|
|
265
265
|
Check_Type(num_outputs, T_FIXNUM);
|
266
266
|
|
267
267
|
ann = fann_create_shortcut(2, NUM2INT(num_inputs), NUM2INT(num_outputs));
|
268
|
-
printf("Created RubyFann::Shortcut [%d].\n", ann);
|
268
|
+
// printf("Created RubyFann::Shortcut [%d].\n", ann);
|
269
269
|
}
|
270
270
|
else
|
271
271
|
{
|
@@ -289,12 +289,12 @@ static VALUE fann_initialize(VALUE self, VALUE hash)
|
|
289
289
|
}
|
290
290
|
|
291
291
|
ann = fann_create_standard_array(num_layers, layers);
|
292
|
-
printf("Created RubyFann::Standard [%d].\n", ann);
|
292
|
+
// printf("Created RubyFann::Standard [%d].\n", ann);
|
293
293
|
}
|
294
294
|
|
295
295
|
DATA_PTR(self) = ann;
|
296
296
|
|
297
|
-
printf("Checking for callback...");
|
297
|
+
// printf("Checking for callback...");
|
298
298
|
|
299
299
|
//int callback = rb_protect(invoke_training_callback, (self), &status);
|
300
300
|
// VALUE callback = rb_funcall(DATA_PTR(self), "training_callback", 0);
|
@@ -302,11 +302,11 @@ static VALUE fann_initialize(VALUE self, VALUE hash)
|
|
302
302
|
{
|
303
303
|
fann_set_callback(ann, &fann_training_callback);
|
304
304
|
fann_set_user_data(ann, self);
|
305
|
-
printf("found(%d).\n", ann->callback);
|
305
|
+
// printf("found(%d).\n", ann->callback);
|
306
306
|
}
|
307
307
|
else
|
308
308
|
{
|
309
|
-
printf("none found.\n");
|
309
|
+
// printf("none found.\n");
|
310
310
|
}
|
311
311
|
|
312
312
|
|
@@ -1691,6 +1691,6 @@ void Init_neural_network ()
|
|
1691
1691
|
rb_define_method(m_rb_fann_train_data_class, "shuffle", shuffle, 0);
|
1692
1692
|
rb_define_method(m_rb_fann_train_data_class, "save", training_save, 1);
|
1693
1693
|
|
1694
|
-
printf("Initialized Ruby Bindings for FANN.\n");
|
1694
|
+
// printf("Initialized Ruby Bindings for FANN.\n");
|
1695
1695
|
}
|
1696
1696
|
|
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 9910840
|
8
8
|
Transform {
|
9
|
-
translation 6.000 46.000
|
9
|
+
translation 6.000 46.000 35.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 9910420
|
28
28
|
Transform {
|
29
|
-
translation 50.000 6.000
|
29
|
+
translation 50.000 6.000 40.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 9910840 -> 9910420
|
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 9910620
|
83
83
|
Transform {
|
84
|
-
translation 28.000 46.000
|
84
|
+
translation 28.000 46.000 19.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 9910620 -> 9910420
|
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 9910570
|
138
138
|
Transform {
|
139
|
-
translation 50.000 46.000
|
139
|
+
translation 50.000 46.000 57.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 9910570 -> 9910420
|
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 9910520
|
193
193
|
Transform {
|
194
|
-
translation 72.000 46.000
|
194
|
+
translation 72.000 46.000 44.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 9910520 -> 9910420
|
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 9910470
|
248
248
|
Transform {
|
249
|
-
translation 94.000 46.000
|
249
|
+
translation 94.000 46.000 35.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 9910470 -> 9910420
|
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.665}
|
304
304
|
] }
|
data/script/destroy
CHANGED
File without changes
|
data/script/generate
CHANGED
File without changes
|
data/script/txt2html
CHANGED
File without changes
|
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.10</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
|
|
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, 15, 7.50000000000000000000e-01) (4, 3,
|
34
|
-
connections (connected_to_neuron, weight)=(0, 2.
|
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, 7.50000000000000000000e-01) (4, 3, 5.00000000000000000000e-01) (5, 5, 5.00000000000000000000e-01)
|
34
|
+
connections (connected_to_neuron, weight)=(0, 2.00039105820477036701e+00) (1, 2.03274634411451637916e+00) (2, -4.46257064225862726259e-03) (0, 1.38511435586062114228e-03) (1, 1.26539842682924907197e-03) (2, -5.81101844943578171865e+01) (3, 1.59744458685062082348e-02) (0, 2.37194974848303485881e-01) (1, 2.39598433574167157811e-01) (2, 1.51636694557795381755e-01) (3, 3.95927860647156535379e+01) (4, 2.39402930061599683587e-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, 2.
|
34
|
+
connections (connected_to_neuron, weight)=(0, 2.05433290291244574632e+00) (1, 1.59728728606381653599e+00) (2, -1.49963709781130272169e+00) (0, 2.04291389090857400390e+00) (1, 2.35253431493651277151e+00) (2, 1.79139698280579695577e+00) (0, -9.64886735337757706077e-01) (1, 7.78451696838703854908e-01) (2, 1.75117047013541693445e+00) (3, -4.27447464423397338606e+00) (4, 4.20971566210125569540e+00) (5, -1.61148452064459113409e+00) (6, -2.38118451923205842746e+00)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-fann
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Miers
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-24 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hoe
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.7.0
|
24
|
+
version:
|
16
25
|
description: Bindings to use FANN from within ruby/rails environment.
|
17
26
|
email: steven@7bpeople.com
|
18
27
|
executables: []
|
@@ -89,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
98
|
requirements: []
|
90
99
|
|
91
100
|
rubyforge_project: ruby-fann
|
92
|
-
rubygems_version: 1.
|
101
|
+
rubygems_version: 1.3.1
|
93
102
|
signing_key:
|
94
103
|
specification_version: 2
|
95
104
|
summary: Bindings to use FANN from within ruby/rails environment.
|