Performing Linear Regression Using Ruby
sharethrough.com
Performing Linear Regression Using Ruby
1–10 of 44 posts
Re: Performing Linear Regression Using Ruby
#2Re: Performing Linear Regression Using Ruby
#3Larger data sets and performance intensive operations are better handled in Python (or Java, C++, etc). Lots of statistical analysis is way below the threshold of Hadoop and company.
Re: Performing Linear Regression Using Ruby
#4Re: Performing Linear Regression Using Ruby
#5B = (X^TX)^(-1)X^TY anyone?
Re: Performing Linear Regression Using Ruby
#6At best, a big asterisk should come from any of these results if you didn't have someone with actual experience validate your design/proposed analyses first.
Re: Performing Linear Regression Using Ruby
#7Re: Performing Linear Regression Using Ruby
#8B = (X^TX)^(-1)X^TY anyone?
Re: Performing Linear Regression Using Ruby
#9Ruby is great for data prep, basic calculations, web app development, and scraping aggregating data and R for visualization. I find them to be a joyful combination. Great for small data sets, quick estimations, and various small projects. Larger data sets and performance intensive operations are better handled in Python (or Java, C++, etc). Lots of statistical analysis is way below the threshold of Hadoop and company…
The missing link here, and the reason Python gets more love from the data community, is that Python scales down to the smaller data sets as well as it handles big ones. (Not sure if you ment it couldn't, but the distinction you make implies that.)
Re: Performing Linear Regression Using Ruby
#10 require 'gsl'
x = GSL::Vector.alloc(array_of_x_values)
y = GSL::Vector.alloc(array_of_y_values)
c0, c1, cov00, cov01, cov11, chisq, status = GSL::Fit::linear(x, y)
It's not nearly as much work, and it's much faster than doing it in pure Ruby. :)(It also does weighted regressions and exponential fitting, among a host of other things. That wheel's gone done been invented already.)