Loess
Simple Loess / Lowess interpolator built in Ruby, based on Apache's LoessInterpolator.
Installation
Add this line to your application's Gemfile:
gem 'loess'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install loess
Usage
regression = Loess::Calculator.calculate(data)
regression = Loess::Calculator.new(data).calculate
# Change your settings
calculator = Loess::Calculator.new(data)
calculator.bandwidth = 0.2
calculator.robustness_factor = 10 # Go crazy
calculator.calculate
# Pass in settings through initialize
calculator = Loess::Calculator.new(data, bandwidth: 0.2, accuracy: 1e-10)
calculator.calculate
Contributing
- Fork it ( https://github.com/swanandp/loess.rb/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request