An experiment with stats, the Ruby way
This is a prototype of a statistical library for Ruby. Starting out, the purpose of the library is to be readable (for people studying statistics), to be well-tested (against R and Python statistical functions), and to be useful for Small Data. Big Data can come later, if I have enough fun. With stats
, I aim to create an API that makes statistics intuitive and harder to mess up. For example, I'd like to take a stab at an assumption framework that can tag specific functions with assumptions that will throw warnings if they're not met.
Once this is stable and fully tested (it is so far for all the functions listed below), I'll consider publishing it as a gem. Until then, you can play around with master
:
brew install gsl
git clone https://github.com/davejacobs/stats.git
cd stats
bundle
I've started integrating R into my tests to make testing as easy and repeatable as possible. I'm also planning to incorporate something like Randly to expand the values that I test.
To run tests:
brew install homebrew/science/r
rspec
gem install gsl
) to work on Ruby 2.0/OS XI've added a wrapper around GSL distribution functions, for more intuitive access and testing.