I am writing a ruby โโmachine learning algorithm that uses gradient descent and logistic regression.
The algorithms work fine, except that in a ruby, the product of points between matrices is very slow.
I started using gem RubyPython, which allows you to import python libraries, such as numpy, into ruby โโand use its functions.
The performance is numpyimpressive. The application started to work 1000% faster, except that I always get segmentation faulthalfway.
Does anyone know any other way to speed up a dot product from 2 matrices in ruby?
Leon source
share