16
$\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$

5 Answers 5

16
$\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$
2
  • $\begingroup$ any progress on the neural net capabilities of gpuR? A NEWS link might be helpful if not :) $\endgroup$ Dec 8, 2017 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, 2017 at 18:12
2
$\begingroup$

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

$\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$
1
$\begingroup$

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

$\endgroup$
0
$\begingroup$

The question is quite old, but LightGBM implementing various tree based learning algorithms :

  • GBDT, Gradient boosting decision tree
  • DART, or Dropouts meet Multiple Additive Regression Trees
  • GOSS, or Gradient-based One-Side Sampling
  • Random Forest

Has a GPU support and an R package which can call the GPU version.

However, as often with GPUs it is more complex than a simple install.package You may find detailed build instructions for lightgbm on the GPU here and once built a couple of steps are needed to have the R interface.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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