API Reference#

This is the class and function reference of cuML. Please refer to the User Guide for further details, as the raw specifications of classes and functions may not be enough to give full guidelines on their use.

Module Configuration#

Output Data Type Configuration#

Object

Description

Module

set_global_output_type

Set global output type for cuML estimators.

cuml

using_output_type

Context manager to temporarily set output type.

cuml

Preprocessing, Metrics, and Utilities#

Model Selection and Data Splitting#

Object

Description

Module

KFold

K-Fold cross-validator.

cuml.model_selection

train_test_split

Split arrays into random train and test subsets.

cuml.model_selection

Feature and Label Encoding (Single-GPU)#

Object

Description

Module

LabelBinarizer

Binarize labels in a one-vs-all fashion.

cuml.preprocessing

LabelEncoder

Encode target labels with value between 0 and n_classes-1.

cuml.preprocessing

OneHotEncoder

Encode categorical features as a one-hot numeric array.

cuml.preprocessing

TargetEncoder

Target Encoder for regression and classification targets.

cuml.preprocessing

Feature Scaling and Normalization (Single-GPU)#

Object

Description

Module

MaxAbsScaler

Scale each feature by its maximum absolute value.

cuml.preprocessing

MinMaxScaler

Transform features by scaling each feature to a given range.

cuml.preprocessing

Normalizer

Normalize samples individually to unit norm.

cuml.preprocessing

RobustScaler

Scale features using statistics that are robust to outliers.

cuml.preprocessing

StandardScaler

Standardize features by removing the mean and scaling to unit variance.

cuml.preprocessing

Other preprocessing methods (Single-GPU)#

Object

Description

Module

ColumnTransformer

Applies transformers to columns of an array or DataFrame.

cuml.compose

PolynomialFeatures

Generate polynomial and interaction features.

cuml.preprocessing

SimpleImputer

Univariate imputer for completing missing values.

cuml.preprocessing

Feature Extraction (Single-GPU)#

Object

Description

Module

CountVectorizer

Convert a collection of text documents to a matrix of token counts.

cuml.feature_extraction

HashingVectorizer

Convert a collection of text documents to a matrix of token occurrences.

cuml.feature_extraction

TfidfVectorizer

Convert a collection of raw documents to a matrix of TF-IDF features.

cuml.feature_extraction

Dataset Generation (Single-GPU)#

Object

Description

Module

make_blobs

Generate isotropic Gaussian blobs for clustering.

cuml.datasets

make_classification

Generate a random classification problem.

cuml.datasets

make_regression

Generate a random regression problem.

cuml.datasets

Metrics (regression, classification, and distance)#

Object

Description

Module

accuracy_score

Accuracy classification score.

cuml.metrics

confusion_matrix

Compute confusion matrix.

cuml.metrics

roc_auc_score

Compute Area Under the ROC Curve.

cuml.metrics

Regression and Classification#

Object

Description

Module

BernoulliNB

Naive Bayes classifier for multivariate Bernoulli models.

cuml.naive_bayes

CategoricalNB

Naive Bayes classifier for categorical features.

cuml.naive_bayes

CD

Coordinate Descent solver.

cuml.solvers

ComplementNB

Complement Naive Bayes classifier.

cuml.naive_bayes

ElasticNet

ElasticNet regression.

cuml.linear_model

ForestInference

Forest Inference for fast prediction of tree-based models.

cuml.fil

GaussianNB

Gaussian Naive Bayes.

cuml.naive_bayes

KernelRidge

Kernel Ridge Regression.

cuml.kernel_ridge

KNeighborsClassifier

K-Nearest Neighbors classifier.

cuml.neighbors

KNeighborsRegressor

K-Nearest Neighbors regressor.

cuml.neighbors

Lasso

Lasso regression.

cuml.linear_model

LinearRegression

Ordinary least squares Linear Regression.

cuml.linear_model

LinearSVC

Linear Support Vector Classification.

cuml.svm

LinearSVR

Linear Support Vector Regression.

cuml.svm

LogisticRegression

Logistic Regression classifier.

cuml.linear_model

MBSGDClassifier

Mini Batch SGD Classifier.

cuml.linear_model

MBSGDRegressor

Mini Batch SGD Regressor.

cuml.linear_model

MultinomialNB

Naive Bayes classifier for multinomial models.

cuml.naive_bayes

OneVsOneClassifier

One-vs-one multiclass strategy.

cuml.multiclass

OneVsRestClassifier

One-vs-the-rest multiclass strategy.

cuml.multiclass

QN

Quasi-Newton solver.

cuml.solvers

RandomForestClassifier

Random Forest classifier.

cuml.ensemble

RandomForestRegressor

Random Forest regressor.

cuml.ensemble

Ridge

Ridge regression.

cuml.linear_model

SGD

Stochastic Gradient Descent solver.

cuml.solvers

SVC

C-Support Vector Classification.

cuml.svm

SVR

Epsilon-Support Vector Regression.

cuml.svm

Clustering#

Object

Description

Module

AgglomerativeClustering

Agglomerative Clustering.

cuml.cluster

DBSCAN

Density-Based Spatial Clustering of Applications with Noise.

cuml.cluster

HDBSCAN

Hierarchical DBSCAN clustering.

cuml.cluster

KMeans

K-Means clustering.

cuml.cluster

SpectralClustering

Spectral clustering.

cuml.cluster

Dimensionality Reduction and Manifold Learning#

Object

Description

Module

GaussianRandomProjection

Reduce dimensionality through Gaussian random projection.

cuml.random_projection

IncrementalPCA

Incremental Principal Component Analysis.

cuml.decomposition

PCA

Principal Component Analysis.

cuml.decomposition

SparseRandomProjection

Reduce dimensionality through sparse random projection.

cuml.random_projection

SpectralEmbedding

Spectral Embedding for non-linear dimensionality reduction.

cuml.manifold

TruncatedSVD

Dimensionality reduction using truncated SVD.

cuml.decomposition

TSNE

t-Distributed Stochastic Neighbor Embedding.

cuml.manifold

UMAP

Uniform Manifold Approximation and Projection.

cuml.manifold

Covariance Estimation#

Object

Description

Module

LedoitWolf

Ledoit-Wolf shrinkage covariance estimator.

cuml.covariance

Neighbors#

Object

Description

Module

KernelDensity

Kernel Density Estimation.

cuml.neighbors

KNeighborsClassifier

K-Nearest Neighbors classifier.

cuml.neighbors

KNeighborsRegressor

K-Nearest Neighbors regressor.

cuml.neighbors

NearestNeighbors

Unsupervised nearest neighbors.

cuml.neighbors

Time Series#

Object

Description

Module

ARIMA

ARIMA time series model.

cuml.tsa

AutoARIMA

Automatic ARIMA model selection.

cuml.tsa

ExponentialSmoothing

Holt-Winters Exponential Smoothing.

cuml.tsa

Model Explainability#

Object

Description

Module

KernelExplainer

SHAP Kernel Explainer.

cuml.explainer

PermutationExplainer

SHAP Permutation Explainer.

cuml.explainer

Multi-Node, Multi-GPU Algorithms#

Object

Description

Module

CD

Multi-GPU Coordinate Descent solver.

cuml.dask

DBSCAN

Multi-GPU DBSCAN clustering.

cuml.dask

ElasticNet

Multi-GPU ElasticNet regression.

cuml.dask

KMeans

Multi-GPU K-Means clustering.

cuml.dask

KNeighborsClassifier

Multi-GPU K-Nearest Neighbors classifier.

cuml.dask

KNeighborsRegressor

Multi-GPU K-Nearest Neighbors regressor.

cuml.dask

Lasso

Multi-GPU Lasso regression.

cuml.dask

LinearRegression

Multi-GPU Linear Regression.

cuml.dask

MultinomialNB

Multi-GPU Multinomial Naive Bayes.

cuml.dask

NearestNeighbors

Multi-GPU Nearest Neighbors.

cuml.dask

PCA

Multi-GPU Principal Component Analysis.

cuml.dask

RandomForestClassifier

Multi-GPU Random Forest classifier.

cuml.dask

RandomForestRegressor

Multi-GPU Random Forest regressor.

cuml.dask

Ridge

Multi-GPU Ridge Regression.

cuml.dask

TruncatedSVD

Multi-GPU Truncated SVD.

cuml.dask

UMAP

Multi-GPU UMAP.

cuml.dask

cuml.accel#

Object

Description

Module

enabled

Check if cuML acceleration is enabled.

cuml.accel

install

Install cuML acceleration hooks.

cuml.accel

is_proxy

Check if an object is a cuML proxy.

cuml.accel

profile

Profile cuML acceleration.

cuml.accel

Experimental#

Object

Description

Module

TreeExplainer

SHAP Tree Explainer.

cuml.explainer