ruby-fann 0.7.10 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -1
- data/License.txt +1 -1
- data/Manifest.txt +22 -1
- data/README.txt +0 -1
- data/Rakefile +0 -0
- data/config/hoe.rb +0 -0
- data/config/requirements.rb +0 -0
- data/ext/ruby_fann/MANIFEST +0 -0
- data/ext/ruby_fann/Makefile +36 -28
- data/ext/ruby_fann/doublefann.c +30 -0
- data/ext/ruby_fann/doublefann.h +33 -0
- data/ext/ruby_fann/extconf.rb +9 -5
- data/ext/ruby_fann/fann.c +1552 -0
- data/ext/ruby_fann/fann_activation.h +144 -0
- data/ext/ruby_fann/fann_augment.h +0 -0
- data/ext/ruby_fann/fann_cascade.c +1031 -0
- data/ext/ruby_fann/fann_cascade.h +503 -0
- data/ext/ruby_fann/fann_data.h +799 -0
- data/ext/ruby_fann/fann_error.c +204 -0
- data/ext/ruby_fann/fann_error.h +161 -0
- data/ext/ruby_fann/fann_internal.h +148 -0
- data/ext/ruby_fann/fann_io.c +762 -0
- data/ext/ruby_fann/fann_io.h +100 -0
- data/ext/ruby_fann/fann_train.c +962 -0
- data/ext/ruby_fann/fann_train.h +1203 -0
- data/ext/ruby_fann/fann_train_data.c +1231 -0
- data/ext/ruby_fann/neural_network.c +0 -0
- data/lib/ruby_fann/neurotica.rb +0 -0
- data/lib/ruby_fann/version.rb +3 -3
- data/lib/ruby_fann.rb +0 -0
- data/neurotica1.png +0 -0
- data/neurotica2.vrml +18 -18
- data/setup.rb +0 -0
- data/tasks/deployment.rake +0 -0
- data/tasks/environment.rake +0 -0
- data/tasks/website.rake +0 -0
- data/test/test.train +0 -0
- data/test/test_helper.rb +0 -0
- data/test/test_neurotica.rb +0 -0
- data/test/test_ruby_fann.rb +0 -0
- data/test/test_ruby_fann_functional.rb +0 -0
- data/verify.train +0 -0
- data/website/index.html +42 -92
- data/website/index.txt +0 -0
- data/website/javascripts/rounded_corners_lite.inc.js +0 -0
- data/website/stylesheets/screen.css +0 -0
- data/website/template.rhtml +0 -0
- data/xor.train +0 -0
- data/xor_cascade.net +2 -2
- data/xor_float.net +1 -1
- metadata +22 -6
- data/log/debug.log +0 -0
@@ -0,0 +1,100 @@
|
|
1
|
+
/*
|
2
|
+
Fast Artificial Neural Network Library (fann)
|
3
|
+
Copyright (C) 2003 Steffen Nissen (lukesky@diku.dk)
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*/
|
19
|
+
|
20
|
+
#ifndef __fann_io_h__
|
21
|
+
#define __fann_io_h__
|
22
|
+
|
23
|
+
/* Section: FANN File Input/Output
|
24
|
+
|
25
|
+
It is possible to save an entire ann to a file with <fann_save> for future loading with <fann_create_from_file>.
|
26
|
+
*/
|
27
|
+
|
28
|
+
/* Group: File Input and Output */
|
29
|
+
|
30
|
+
/* Function: fann_create_from_file
|
31
|
+
|
32
|
+
Constructs a backpropagation neural network from a configuration file, which have been saved by <fann_save>.
|
33
|
+
|
34
|
+
See also:
|
35
|
+
<fann_save>, <fann_save_to_fixed>
|
36
|
+
|
37
|
+
This function appears in FANN >= 1.0.0.
|
38
|
+
*/
|
39
|
+
FANN_EXTERNAL struct fann *FANN_API fann_create_from_file(const char *configuration_file);
|
40
|
+
|
41
|
+
|
42
|
+
/* Function: fann_save
|
43
|
+
|
44
|
+
Save the entire network to a configuration file.
|
45
|
+
|
46
|
+
The configuration file contains all information about the neural network and enables
|
47
|
+
<fann_create_from_file> to create an exact copy of the neural network and all of the
|
48
|
+
parameters associated with the neural network.
|
49
|
+
|
50
|
+
These three parameters (<fann_set_callback>, <fann_set_error_log>,
|
51
|
+
<fann_set_user_data>) are *NOT* saved to the file because they cannot safely be
|
52
|
+
ported to a different location. Also temporary parameters generated during training
|
53
|
+
like <fann_get_MSE> is not saved.
|
54
|
+
|
55
|
+
Return:
|
56
|
+
The function returns 0 on success and -1 on failure.
|
57
|
+
|
58
|
+
See also:
|
59
|
+
<fann_create_from_file>, <fann_save_to_fixed>
|
60
|
+
|
61
|
+
This function appears in FANN >= 1.0.0.
|
62
|
+
*/
|
63
|
+
FANN_EXTERNAL int FANN_API fann_save(struct fann *ann, const char *configuration_file);
|
64
|
+
|
65
|
+
|
66
|
+
/* Function: fann_save_to_fixed
|
67
|
+
|
68
|
+
Saves the entire network to a configuration file.
|
69
|
+
But it is saved in fixed point format no matter which
|
70
|
+
format it is currently in.
|
71
|
+
|
72
|
+
This is usefull for training a network in floating points,
|
73
|
+
and then later executing it in fixed point.
|
74
|
+
|
75
|
+
The function returns the bit position of the fix point, which
|
76
|
+
can be used to find out how accurate the fixed point network will be.
|
77
|
+
A high value indicates high precision, and a low value indicates low
|
78
|
+
precision.
|
79
|
+
|
80
|
+
A negative value indicates very low precision, and a very
|
81
|
+
strong possibility for overflow.
|
82
|
+
(the actual fix point will be set to 0, since a negative
|
83
|
+
fix point does not make sence).
|
84
|
+
|
85
|
+
Generally, a fix point lower than 6 is bad, and should be avoided.
|
86
|
+
The best way to avoid this, is to have less connections to each neuron,
|
87
|
+
or just less neurons in each layer.
|
88
|
+
|
89
|
+
The fixed point use of this network is only intended for use on machines that
|
90
|
+
have no floating point processor, like an iPAQ. On normal computers the floating
|
91
|
+
point version is actually faster.
|
92
|
+
|
93
|
+
See also:
|
94
|
+
<fann_create_from_file>, <fann_save>
|
95
|
+
|
96
|
+
This function appears in FANN >= 1.0.0.
|
97
|
+
*/
|
98
|
+
FANN_EXTERNAL int FANN_API fann_save_to_fixed(struct fann *ann, const char *configuration_file);
|
99
|
+
|
100
|
+
#endif
|