Interface to 'H2O4GPU'

Interface to 'H2O4GPU' <>, a collection of 'GPU' solvers for machine learning algorithms.

This directory contains the R package for H2O4GPU. H2O4GPU is a collection of GPU solvers by H2Oai with APIs in Python and R. The Python API builds upon the easy-to-use scikit-learn API and its well-tested CPU-based algorithms. It can be used as a drop-in replacement for scikit-learn (i.e. import h2o4gpu as sklearn) with support for GPUs on selected (and ever-growing) algorithms. H2O4GPU inherits all the existing scikit-learn algorithms and falls back to CPU algorithms when the GPU algorithm does not support an important existing scikit-learn class option. The R package is a wrapper around the H2O4GPU Python package, and the interface follows standard R conventions for modeling.


First, please follow the instruction here to build the H2O4GPU Python package.

Then install h2o4gpu R package via the following:

if (!require(devtools)) install.packages("devtools")
devtools::install_github("h2oai/h2o4gpu", subdir = "src/interface_r")

To test your installation, try the following example that builds a simple XGBoost random forest classifier:

# Setup dataset
x <- iris[1:4]
y <- as.integer(iris$Species) - 1
# Initialize and train the classifier
model <- h2o4gpu.random_forest_classifier() %>% fit(x, y)
# Make predictions
predictions <- model %>% predict(x)

For more examples, please visit the package vignettes.


h2o4gpu 0.2.0 (CRAN)

  • Initial release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.0 by Yuan Tang, 3 years ago

Report a bug at

Browse source code at

Authors: Yuan Tang [aut, cre] , Navdeep Gill [aut] , Erin LeDell [aut] , [cph, fnd]

Documentation:   PDF Manual  

Apache License 2.0 license

Imports magrittr, reticulate

Suggests testthat, knitr

System requirements: Python (>= 3.6) with header files and shared library; H2O4GPU (

See at CRAN