ruby-fann 1.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,6 @@ require 'mkmf'
7
7
  #find_library("doublefann", "fann_create_standard", "/usr/local/lib")
8
8
 
9
9
  #dir_config('fann', '.')
10
- $objs=["neural_network.o", "doublefann.o"]
10
+ $objs=["ruby_fann.o", "doublefann.o"]
11
11
  have_header("doublefann.h")
12
- create_makefile("neural_network")
12
+ create_makefile("ruby_fann")
@@ -1503,7 +1503,7 @@ static VALUE nn_save(VALUE self, VALUE filename)
1503
1503
  }
1504
1504
 
1505
1505
  /** Initializes class under RubyFann module/namespace. */
1506
- void Init_neural_network ()
1506
+ void Init_ruby_fann ()
1507
1507
  {
1508
1508
  // RubyFann module/namespace:
1509
1509
  m_rb_fann_module = rb_define_module ("RubyFann");
@@ -0,0 +1 @@
1
+ require "ruby_fann"
@@ -1,5 +1,5 @@
1
- $:.unshift File.dirname(__FILE__)
1
+ require "ruby_fann/version"
2
+ require "ruby_fann/ruby_fann"
2
3
 
3
4
  module RubyFann
4
-
5
- end
5
+ end
@@ -48,8 +48,8 @@ module RubyFann
48
48
  fillcolor = "transparent" # : "khaki3"
49
49
  layer = neuron[:layer]
50
50
  fillcolor = case layer
51
- when 0 then @input_layer_color
52
- when max_layer then @output_layer_color
51
+ when 0: @input_layer_color
52
+ when max_layer: @output_layer_color
53
53
  else; @hidden_layer_colors[(layer-1) % @hidden_layer_colors.length]
54
54
  end
55
55
 
@@ -1,8 +1,8 @@
1
1
  module RubyFann #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 1
5
- TINY = 3
4
+ MINOR = 2
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,167 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-fann
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 1
8
- - 3
9
- version: 1.1.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
12
- - Steven Miers
7
+ authors:
8
+ - tangledpath
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-03-15 00:00:00 -05:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rubyforge
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 0
30
- - 4
31
- version: 2.0.4
32
- type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: gemcutter
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- - 5
44
- - 0
45
- version: 0.5.0
46
- type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: hoe
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 2
57
- - 5
58
- - 0
59
- version: 2.5.0
60
- type: :development
61
- version_requirements: *id003
62
- description: Bindings to use FANN from within ruby/rails environment.
63
- email: steven@7bpeople.com
12
+ date: 2013-03-26 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Bindings to use FANN from within ruby/rails environment
15
+ email:
16
+ - steven.miers@gmail.com
64
17
  executables: []
65
-
66
- extensions:
18
+ extensions:
67
19
  - ext/ruby_fann/extconf.rb
68
- extra_rdoc_files:
69
- - History.txt
70
- - License.txt
71
- - Manifest.txt
72
- - README.txt
73
- - website/index.txt
74
- files:
75
- - History.txt
76
- - License.txt
77
- - Manifest.txt
78
- - README.txt
79
- - Rakefile
80
- - config/hoe.rb
81
- - config/requirements.rb
82
- - ext/ruby_fann/MANIFEST
83
- - ext/ruby_fann/Makefile
84
- - ext/ruby_fann/extconf.rb
85
- - ext/ruby_fann/ruby_compat.h
86
- - ext/ruby_fann/fann_augment.h
87
- - ext/ruby_fann/neural_network.c
88
- - ext/ruby_fann/doublefann.h
20
+ extra_rdoc_files: []
21
+ files:
22
+ - lib/ruby-fann.rb
23
+ - lib/ruby_fann/neurotica.rb
24
+ - lib/ruby_fann/version.rb
25
+ - lib/ruby_fann.rb
26
+ - ext/ruby_fann/doublefann.c
27
+ - ext/ruby_fann/fann.c
28
+ - ext/ruby_fann/fann_cascade.c
29
+ - ext/ruby_fann/fann_error.c
30
+ - ext/ruby_fann/fann_io.c
31
+ - ext/ruby_fann/fann_train.c
32
+ - ext/ruby_fann/fann_train_data.c
33
+ - ext/ruby_fann/ruby_fann.c
89
34
  - ext/ruby_fann/config.h
90
- - ext/ruby_fann/fann_error.h
35
+ - ext/ruby_fann/doublefann.h
36
+ - ext/ruby_fann/fann.h
91
37
  - ext/ruby_fann/fann_activation.h
38
+ - ext/ruby_fann/fann_augment.h
39
+ - ext/ruby_fann/fann_cascade.h
92
40
  - ext/ruby_fann/fann_data.h
41
+ - ext/ruby_fann/fann_error.h
93
42
  - ext/ruby_fann/fann_internal.h
94
- - ext/ruby_fann/fann_train.h
95
- - ext/ruby_fann/fann_cascade.h
96
43
  - ext/ruby_fann/fann_io.h
97
- - ext/ruby_fann/fann.h
98
- - ext/ruby_fann/fann.c
99
- - ext/ruby_fann/doublefann.c
100
- - ext/ruby_fann/fann_io.c
101
- - ext/ruby_fann/fann_train.c
102
- - ext/ruby_fann/fann_train_data.c
103
- - ext/ruby_fann/fann_error.c
104
- - ext/ruby_fann/fann_cascade.c
105
- - lib/ruby_fann.rb
106
- - lib/ruby_fann/neurotica.rb
107
- - lib/ruby_fann/version.rb
108
- - neurotica1.png
109
- - neurotica2.vrml
110
- - script/destroy
111
- - script/generate
112
- - script/txt2html
113
- - setup.rb
114
- - tasks/deployment.rake
115
- - tasks/environment.rake
116
- - tasks/website.rake
117
- - test/test.train
118
- - test/test_helper.rb
119
- - test/test_neurotica.rb
120
- - test/test_ruby_fann.rb
121
- - test/test_ruby_fann_functional.rb
122
- - verify.train
123
- - website/index.html
124
- - website/index.txt
125
- - website/javascripts/rounded_corners_lite.inc.js
126
- - website/stylesheets/screen.css
127
- - website/template.rhtml
128
- - xor.train
129
- - xor_cascade.net
130
- - xor_float.net
131
- has_rdoc: true
132
- homepage: http://ruby-fann.rubyforge.org
44
+ - ext/ruby_fann/fann_train.h
45
+ - ext/ruby_fann/ruby_compat.h
46
+ - ext/ruby_fann/extconf.rb
47
+ homepage: http://github.com/tangledpath/ruby-fann
133
48
  licenses: []
134
-
135
49
  post_install_message:
136
- rdoc_options:
137
- - --main
138
- - README.txt
139
- require_paths:
50
+ rdoc_options: []
51
+ require_paths:
140
52
  - lib
141
53
  - ext
142
- required_ruby_version: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- segments:
147
- - 0
148
- version: "0"
149
- required_rubygems_version: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- segments:
154
- - 0
155
- version: "0"
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
156
66
  requirements: []
157
-
158
- rubyforge_project: ruby-fann
159
- rubygems_version: 1.3.6
67
+ rubyforge_project:
68
+ rubygems_version: 1.8.23
160
69
  signing_key:
161
70
  specification_version: 3
162
- summary: Bindings to use FANN from within ruby/rails environment.
163
- test_files:
164
- - test/test_helper.rb
165
- - test/test_neurotica.rb
166
- - test/test_ruby_fann.rb
167
- - test/test_ruby_fann_functional.rb
71
+ summary: Bindings to use FANN from within ruby/rails environment. Fann is a is a
72
+ free open source neural network library, which implements multilayer artificial
73
+ neural networks with support for both fully connected and sparsely connected networks. It
74
+ is easy to use, versatile, well documented, and fast. RubyFann makes working with
75
+ neural networks a breeze using ruby, with the added benefit that most of the heavy
76
+ lifting is done natively.
77
+ test_files: []
78
+ has_rdoc: true
@@ -1,76 +0,0 @@
1
- == 1.1.3 2010-03-08
2
- * 1 major enhancement -
3
- * ruby 1.9 compatibility:
4
-
5
- == 1.0.3 2009-12-24
6
- * 1 minor bug fix:
7
- * Fix segfaulting training in irb
8
-
9
- == 1.0.2 2009-12-02
10
-
11
- * 1 minor enhancement:
12
- * Added missing file to manifest
13
-
14
- == 1.0.1 2009-12-02
15
-
16
- * 1 minor enhancement:
17
- * Remove some extra source files
18
-
19
- == 1.0.0 2009-12-01
20
-
21
- * 1 major enhancement:
22
- * Can build/install & execute without first installing & building FANN.
23
-
24
- == 0.7.10 2008-11-24
25
-
26
- * 1 minor enhancement:
27
- * Remove several printf statements that were showing up in certain production environment's error logs.
28
-
29
- == 0.7.9 2008-08-15
30
-
31
- * 1 major bug fix:
32
- * Fix set_activation_function for correct # of args (2 instead of 1)
33
- * 1 minor enhancement
34
- * Provide support for fann_get_activation_function
35
-
36
- == 0.7.8 2007-03-25
37
-
38
- * 1 major enhancement:
39
- * training_callback(args) will be automatically called during training if implemented on subclass. See README for details.
40
-
41
- == 0.7.7 2007-01-23
42
-
43
- * 1 minor enhancement:
44
- * Cull bias neuron(s) from get_neurons function
45
-
46
- == 0.7.6 2007-01-14
47
-
48
- * 1 minor bug fix:
49
- * Exception (instead of pukage) if zero-length array given on training data
50
-
51
- == 0.7.5 2007-12-21
52
-
53
- * 3 minor enhancements:
54
- * Fixed rdoc to use actual parameter names
55
- * Minor code cleanup & symbol fixage
56
- * Nicer error messages for windows users
57
-
58
- == 0.7.4 2007-12-19
59
-
60
- * 1 minor enhancement:
61
- * Nicer message if FANN not installed
62
-
63
- == 0.7.3 2007-12-19
64
-
65
- * 1 minor enhancement:
66
- * Directives to build native extensions
67
-
68
- == 0.7.2 2007-12-18
69
-
70
- * 1 major enhancement:
71
- * Include docs
72
-
73
- == 0.0.1 2007-12-18
74
-
75
- * 1 major enhancement:
76
- * Initial release
@@ -1,20 +0,0 @@
1
- Copyright (c) 2007-2009 Steven Miers
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,63 +0,0 @@
1
- History.txt
2
- License.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- config/hoe.rb
7
- config/requirements.rb
8
- ext/ruby_fann/MANIFEST
9
- ext/ruby_fann/Makefile
10
- ext/ruby_fann/extconf.rb
11
- ext/ruby_fann/ruby_compat.h
12
- ext/ruby_fann/fann_augment.h
13
- ext/ruby_fann/neural_network.c
14
- ext/ruby_fann/doublefann.h
15
- ext/ruby_fann/config.h
16
- ext/ruby_fann/fann_error.h
17
- ext/ruby_fann/fann_activation.h
18
- ext/ruby_fann/fann_data.h
19
- ext/ruby_fann/fann_internal.h
20
- ext/ruby_fann/fann_train.h
21
- ext/ruby_fann/fann_cascade.h
22
- ext/ruby_fann/fann_io.h
23
- ext/ruby_fann/fann.h
24
- ext/ruby_fann/fann.c
25
- ext/ruby_fann/doublefann.c
26
- ext/ruby_fann/fann_io.c
27
- ext/ruby_fann/fann_train.c
28
- ext/ruby_fann/fann_train_data.c
29
- ext/ruby_fann/fann_error.c
30
- ext/ruby_fann/fann_cascade.c
31
- ext/ruby_fann/fann_io.c
32
- ext/ruby_fann/fann_train.c
33
- ext/ruby_fann/fann_train_data.c
34
- ext/ruby_fann/fann_error.c
35
- ext/ruby_fann/fann_cascade.c
36
- lib/ruby_fann.rb
37
- lib/ruby_fann/neurotica.rb
38
- lib/ruby_fann/
39
- lib/ruby_fann/version.rb
40
- log/
41
- neurotica1.png
42
- neurotica2.vrml
43
- script/destroy
44
- script/generate
45
- script/txt2html
46
- setup.rb
47
- tasks/deployment.rake
48
- tasks/environment.rake
49
- tasks/website.rake
50
- test/test.train
51
- test/test_helper.rb
52
- test/test_neurotica.rb
53
- test/test_ruby_fann.rb
54
- test/test_ruby_fann_functional.rb
55
- verify.train
56
- website/index.html
57
- website/index.txt
58
- website/javascripts/rounded_corners_lite.inc.js
59
- website/stylesheets/screen.css
60
- website/template.rhtml
61
- xor.train
62
- xor_cascade.net
63
- xor_float.net
data/README.txt DELETED
@@ -1,30 +0,0 @@
1
- = RubyFann
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
5
- Ruby 1.8.6 or greater.
6
- gnu make tools or equiv for native code in ext
7
-
8
- == Examples
9
- train = RubyFann::TrainData.new(:inputs=>[[0.3, 0.4, 0.5], [0.1, 0.2, 0.3]], :desired_outputs=>[[0.7], [0.8]])
10
- fann = RubyFann::Standard.new(:num_inputs=>5, :hidden_neurons=>[2, 8, 4, 3, 4], :num_outputs=>1)
11
- fann.train_on_data(train, 1000, 10, 0.1)
12
- outputs = fann.run([3.0, 2.0, 3.0])
13
-
14
- == Now implements a callback method
15
- This callback function can be called during training when using train_on_data, train_on_file or cascadetrain_on_data.
16
-
17
- It is very useful for doing custom things during training. It is recommended to use this function when implementing custom training procedures, or when visualizing the training in a GUI etc. The args which the callback function takes is the parameters given to the train_on_data, plus an epochs parameter which tells how many epochs the training have taken so far.
18
-
19
- The callback method should return an integer, if the callback function returns -1, the training will terminate.
20
-
21
- The callback (training_callback) will be automatically called if it is implemented on your subclass as follows:
22
-
23
- <code>
24
- class MyFann < RubyFann::Standard
25
- def training_callback(args)
26
- puts "ARGS: #{args.inspect}"
27
- 0
28
- end
29
- end
30
- </code>