perceptron 0.3.0 → 0.3.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/perceptron.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3677481dca50d3c365399ce3b8ad3d1a287ecda
4
- data.tar.gz: 961b82debb781b115480b1a4c5ba971406e312fa
3
+ metadata.gz: 930eebd4a40a48c24674b302d7c4465e9c9e8b8a
4
+ data.tar.gz: 64b1dbe2114cf62564eb1207b1578d834090b329
5
5
  SHA512:
6
- metadata.gz: 40ae94bb24d712e6c000049789e3c0a19d524f38678ee890fa9d2c5473f91f5804ba114f08ee4541d37e47922ea7090a056f641e4f21546794423829953d3b98
7
- data.tar.gz: 4cdcf3c9511911f76bf8fe01eb31699390214a09898c10899ab723e95f53808e1b4300b74e892b96bbb15c295adfa5a2b3dcd29ba38971d88d6c4b4f7d2c268b
6
+ metadata.gz: 00ef041b936278382ba8ab060b5101ba828fa02ae2eda68df0be31229f54beee05eb76807af08ffc5e3bf58ef26fa448c29309c14ad74cf61b393314d035265d
7
+ data.tar.gz: 8657117ed2de34ddb9cbf619f35df44d0607b75c00f2e94d97639309fd9f4068f3900332a8fdeea7baf680a1155ba77a271e1086d8fe617757a7f27de2032983
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Perceptron
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/perceptron`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ The perceptron is a linear binary classifier. Given enough linearly separable data, it can find a decision boundary that allows predictions about unseen data.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,11 +20,18 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- Instantiate a new Perceptron with the desired number of features to track. The perceptron accepts an array of hashes of the form {:vector => Vector[...], :expected => number} as training input.
23
+ Instantiate a new Perceptron with the desired number of features to track.
26
24
  ```ruby
27
25
  Perceptron.create(features_number)
28
26
  ```
29
-
27
+ The perceptron accepts a hash of the form {:vector => Vector[...], :expected => number} as training input.
28
+ ```ruby
29
+ Perceptron.train({:vector => Vector[0, 1, 0, 1], :expected => 0})
30
+ ```
31
+ To make a prediction just write
32
+ ```ruby
33
+ Perceptron.predict(Vector[0,3,6,7])
34
+ ```
30
35
  ## Development
31
36
 
32
37
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -35,7 +40,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
35
40
 
36
41
  ## Contributing
37
42
 
38
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/perceptron.
43
+ Bug reports and pull requests are welcome on GitHub at https://github.com/terminalobject/perceptron.
39
44
 
40
45
  ## License
41
46
 
data/perceptron.gemspec CHANGED
@@ -5,7 +5,7 @@ require "perceptron/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "perceptron"
8
- spec.version = "0.3.0"
8
+ spec.version = "0.3.1"
9
9
  spec.authors = ["Alessandro Noiato", "Alistair Kung", "Corina Gheorghe", "Jini Coroneo", "Tom Scanlon"]
10
10
  spec.email = ["doctorboredom@hotmail.com"]
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perceptron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Noiato