loess 0.0.1 → 0.0.2
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 +24 -4
- data/lib/loess/version.rb +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: ff9bf84e866bef37df440f320c402747991dc6fc
|
4
|
+
data.tar.gz: 28ba47301e55103c3364a95e4c95e4dbe50ea766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8b520f772d7b65ad1cfa3a4795b21e7e730306ecc577bfa1917ae83bc7e8ccccd2efe80d2e43b16f2f054642b1c0bf5afc29f66c84b54840c9aefa89612c9fe
|
7
|
+
data.tar.gz: 85461339e82b5e91256b2828c5a24cc09280bbb8e9a0b3e7030e0307c1117adaf1bc9e5287f3d7f9ce4cdc306b5d3472b78bfa59f8c4be70e3d5af515597d380
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Loess
|
2
2
|
|
3
|
-
|
3
|
+
Simple Loess / Lowess interpolator built in Ruby, based on Apache's [`LoessInterpolator`][1].
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,7 +10,7 @@ Add this line to your application's Gemfile:
|
|
10
10
|
|
11
11
|
And then execute:
|
12
12
|
|
13
|
-
$ bundle
|
13
|
+
$ bundle install
|
14
14
|
|
15
15
|
Or install it yourself as:
|
16
16
|
|
@@ -18,12 +18,32 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
```Ruby
|
22
|
+
|
23
|
+
regression = Loess::Calculator.calculate(data)
|
24
|
+
regression = Loess::Calculator.new(data).calculate
|
25
|
+
|
26
|
+
# Change your settings
|
27
|
+
|
28
|
+
calculator = Loess::Calculator.new(data)
|
29
|
+
calculator.bandwidth = 0.2
|
30
|
+
calculator.robustness_factor = 10 # Go crazy
|
31
|
+
calculator.calculate
|
32
|
+
|
33
|
+
# Pass in settings through initialize
|
34
|
+
calculator = Loess::Calculator.new(data, bandwidth: 0.2, accuracy: 1e-10)
|
35
|
+
calculator.calculate
|
36
|
+
|
37
|
+
|
38
|
+
```
|
22
39
|
|
23
40
|
## Contributing
|
24
41
|
|
25
|
-
1. Fork it ( https://github.com/
|
42
|
+
1. Fork it ( https://github.com/swanandp/loess.rb/fork )
|
26
43
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
44
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
45
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
46
|
5. Create a new Pull Request
|
47
|
+
|
48
|
+
|
49
|
+
[1]: http://commons.apache.org/proper/commons-math/jacoco/org.apache.commons.math3.analysis.interpolation/LoessInterpolator.java.html
|
data/lib/loess/version.rb
CHANGED