newral 0.1 → 0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 281bfa9ba74cbd19d659513e73eae475f6f1ec7e
4
- data.tar.gz: 99a0085f6bc6a1b6a38237dc330110950df04f19
3
+ metadata.gz: b9047684d474438632d4eab4774fbb7b9debecc5
4
+ data.tar.gz: 0d83a2232560366d75af79b848fbbb8ba358169d
5
5
  SHA512:
6
- metadata.gz: 63af6de490824297c3561b6e1c77f1681d099e17e38323fbd15080b4447a08abe8fd83c257a8e1c2936e08591260798895cf526af2288dda188ad12490b3e19d
7
- data.tar.gz: 786ff86c34e25ad4bbbb4cfd322c0d40efa39308778ab18efd6641bb3126e62e3ad6af02ecc608bc2225fcbb66519d15645e8a603d744e7feb9110d61a8401f1
6
+ metadata.gz: 27e1bca6445adcc1d518d898e2e0e027d0d573eaba8bae588a9350a6d676d285afa549a9bc2a1ac07019f44645dc6cf8516b389069f50bf03ff8c3b322a0b0ea
7
+ data.tar.gz: 505f5faa6a843b4b5ab9e2c6654f6a8c32aa692bcf73d5058f95b3167a30c649979f250bbb17720d119e06a4aae5a4224a6d40ee53931607ca5caca3a061f9ed
data/README.md CHANGED
@@ -9,7 +9,13 @@ In the implementation I tried to write as little code as possible and used class
9
9
  So the data structures are in no way tuned for efficiency, rather I tried to make clear what actually is going on.
10
10
  For every concept there should be at least one test to show it in action.
11
11
 
12
+ ## Install
12
13
 
14
+ ```ruby
15
+ gem install newral
16
+ ```
17
+
18
+ ## What it does
13
19
  Everything is still quite early stages but there are a lot of things you can do already
14
20
 
15
21
  * Training Functions
@@ -167,13 +173,13 @@ data = Newral::Data::Csv.new(file_name:File.expand_path('../test/fixtures/IRIS.c
167
173
  data.process
168
174
 
169
175
  network = Newral::Networks::BackpropagationNetwork.new( number_of_inputs: data.inputs.first.size, number_of_hidden: data.inputs.first.size, number_of_outputs: data.output_hash.keys.size )
170
- network.calculate_error( input: data.sub_set(set: :inputs, category: :validation ), output: data.output_as_vector( category: :testing ) )
176
+ network.calculate_error( input: data.sub_set(set: :inputs, category: :validation ), output: data.output_as_vector( category: :validation ) )
171
177
 
172
178
  100.times do
173
179
  network.train( input: data.sub_set(set: :inputs, category: :training ), output: data.output_as_vector( category: :training ) )
174
180
  end
175
181
 
176
- network.calculate_error( input: data.sub_set(set: :inputs, category: :validation ), output: data.output_as_vector( category: :testing ) )
182
+ network.calculate_error( input: data.sub_set(set: :inputs, category: :validation ), output: data.output_as_vector( category: :validation ) )
177
183
 
178
184
  ```
179
185
 
@@ -186,7 +192,7 @@ data.process
186
192
  sample_data = data.sample( limit:100 )
187
193
  sample_data.downsample_input!( width:2,height:2,width_of_line:28 ) # create less resolution pictures
188
194
 
189
- sample_data2 = data.sample( limit:100, offset:100 ) # a 2bd sample
195
+ sample_data2 = data.sample( limit:100, offset:100 ) # a 2nd sample
190
196
  sample_data2.downsample_input!( width:2,height:2,width_of_line:28 )
191
197
 
192
198
 
@@ -252,7 +258,7 @@ f.calculate 2 # 2*(2**2)+5*2+1 => 19
252
258
  first lets use a basic polynominal function
253
259
  ```ruby
254
260
  input = [2,4,8]
255
- output = [4,16,64] # best function is x**2, lets see if our training algorithms find them
261
+ output = [4,16,64] # best function is x**2, lets see if our training algorithms finds them
256
262
  g=Newral::Training::Greedy.new( input: input, output: output, klass: Newral::Functions::Polynomial )
257
263
  g.process
258
264
  g.best_function.calculate_error( input: input, output: output )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newral
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - stefan