15
$\begingroup$

Are there any machine learning packages for R that can make use of the GPU to improve training speed (something like theano from the python world)?

I see that there is a package called gputools which allows execution of code on the gpu, but I'm looking for a more complete library for machine learning.

$\endgroup$
15
$\begingroup$

As for a complete machine learning package on GPU's, no such package exists. However, there are actually a handful of R packages that can use GPU's. You can see these packages on the CRAN High Performance Computing page. You should note that most of these packages do require you to have a NVIDIA card. Of the packages available, there are three packages you most likely would utilize unless you have a special case.

  1. gputools - if interested in distance computations (only NVIDIA).
  2. gmatrix - general numeric computations (only NVIDIA).
  3. gpuR - general numeric computations (any GPU via OpenCL).*

* NOTE - At the risk of self promotion I am the author of the gpuR package.

You can likely use the latter two packages to reproduce existing machine learning algorithms. I am actually using my gpuR package to create a GPU accelerated neuralnet package but this is in progress.

So in summary, if you are determined, the basic resources are available in R. But if you need something in the immediate future, you will need to explore other resources/approaches as pointed out by @YCR.

$\endgroup$
  • $\begingroup$ any progress on the neural net capabilities of gpuR? A NEWS link might be helpful if not :) $\endgroup$ – MichaelChirico Dec 8 '17 at 7:39
  • $\begingroup$ The gpuR NEWS is here. The neural net capabilities are still in progress. There are multiple packages that will be involved with this as each may be used independently (lazytensor, gpuRNN, & prometheus). You can follow my github if you are curious. I am only one developer working in my spare moments and I need to continue developing and maintaining my other packages. $\endgroup$ – cdeterman Dec 8 '17 at 18:12
2
$\begingroup$

This is really a wrapper over tensorflow, caffe, mxnet, but may be useful to you.

https://www.h2o.ai/deep-water/

$\endgroup$
1
$\begingroup$

If you use SVM, you can try Rgtsvm package for GPU which is backwards compatible with the e1071 implementation.

https://github.com/Danko-Lab/Rgtsvm

$\endgroup$
1
$\begingroup$

A good library for machine learning with GPUs is mxnet. The package is mostly deep learning though, so if you are looking for specific machine learning algorithms you might not find them there. However they have a good set of deep learning algorithms.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.