Learn R Programming

⚠️There's a newer version (0.3.3) of this package.Take me there.

h2o4gpu - R Interface to H2O4GPU

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.

Installation

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:

library(h2o4gpu)

# 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.

Copy Link

Version

Install

install.packages('h2o4gpu')

Monthly Downloads

273

Version

0.2.0

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Yuan Tang

Last Published

March 23rd, 2018

Functions in h2o4gpu (0.2.0)

h2o4gpu.pca

Principal Component Analysis (PCA)
h2o4gpu.gradient_boosting_regressor

Gradient Boosting Regressor
fit.h2o4gpu_model

Train an H2O4GPU Estimator
h2o4gpu.random_forest_classifier

Random Forest Classifier
fit

Generic Method to Train an H2O4GPU Estimator
h2o4gpu.random_forest_regressor

Random Forest Regressor
h2o4gpu.kmeans

K-means Clustering
h2o4gpu.truncated_svd

Truncated Singular Value Decomposition (TruncatedSVD)
h2o4gpu

h2o4gpu in R
predict.h2o4gpu_model

Make Predictions using Trained H2O4GPU Estimator
h2o4gpu.elastic_net_classifier

Elastic Net Classifier
reexports

Objects exported from other packages
h2o4gpu.elastic_net_regressor

Elastic Net Regressor
h2o4gpu.gradient_boosting_classifier

Gradient Boosting Classifier
transform.h2o4gpu_model

Transform a Dataset using Trained H2O4GPU Estimator