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.
- checksums.yaml +4 -4
- data/README.md +11 -6
- data/perceptron.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 930eebd4a40a48c24674b302d7c4465e9c9e8b8a
|
|
4
|
+
data.tar.gz: 64b1dbe2114cf62564eb1207b1578d834090b329
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00ef041b936278382ba8ab060b5101ba828fa02ae2eda68df0be31229f54beee05eb76807af08ffc5e3bf58ef26fa448c29309c14ad74cf61b393314d035265d
|
|
7
|
+
data.tar.gz: 8657117ed2de34ddb9cbf619f35df44d0607b75c00f2e94d97639309fd9f4068f3900332a8fdeea7baf680a1155ba77a271e1086d8fe617757a7f27de2032983
|
data/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Perceptron
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
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/
|
|
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.
|
|
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
|
|