How to implement linear regression in Ruby | Open Awesome