diff --git a/.gitignore b/.gitignore index 88ffdf0ba1..dd786f0b77 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,14 @@ junit-*.xml docs/source/*.model docs/source/*.pkl docs/source/*.tl +docs/source/*.joblib + +## autosummary-generated API reference stubs +docs/source/api/generated/ + +## Sphinx build output +docs/build/ +docs/_html/ ## eclipse .project diff --git a/docs/source/FIL.rst b/docs/source/FIL.rst index ff3f331bbb..680295c1ab 100644 --- a/docs/source/FIL.rst +++ b/docs/source/FIL.rst @@ -138,7 +138,7 @@ FIL is ideal for many scenarios: API Reference ============= -See the :doc:`API reference ` for the API documentation. +See the :doc:`API reference ` for the API documentation. Migration Guide =============== diff --git a/docs/source/_templates/autosummary/base.rst b/docs/source/_templates/autosummary/base.rst new file mode 100644 index 0000000000..5b4f3d1c09 --- /dev/null +++ b/docs/source/_templates/autosummary/base.rst @@ -0,0 +1,26 @@ +{{ objname | escape | underline(line="=") }} + +{% if objtype == "module" -%} + +.. automodule:: {{ fullname }} + +{%- elif objtype == "function" -%} + +.. currentmodule:: {{ module }} + +.. autofunction:: {{ objname }} + +{%- elif objtype == "class" -%} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + :members: + +{%- else -%} + +.. currentmodule:: {{ module }} + +.. auto{{ objtype }}:: {{ objname }} + +{%- endif -%} diff --git a/docs/source/api.rst b/docs/source/api.rst deleted file mode 100644 index f4baf76d88..0000000000 --- a/docs/source/api.rst +++ /dev/null @@ -1,690 +0,0 @@ -~~~~~~~~~~~~~ -API Reference -~~~~~~~~~~~~~ - -.. role:: py(code) - :language: python - :class: highlight - - -Module Configuration -==================== - -.. _output-data-type-configuration: - -Output Data Type Configuration ------------------------------- - -.. autofunction:: cuml.set_global_output_type - -.. autofunction:: cuml.using_output_type - -.. _verbosity-levels: - -Verbosity Levels ----------------- - -cuML follows a verbosity model similar to Scikit-learn's: The verbose parameter -can be a boolean, or a numeric value, and higher numeric values mean more verbosity. The exact values can be set directly, or through the cuml.common.logger module, and -they are: - -.. list-table:: Verbosity Levels - :widths: 25 25 50 - :header-rows: 1 - - * - Numeric value - - cuml.common.logger value - - Verbosity level - * - 0 - - cuml.common.logger.level_enum.off - - Disables all log messages - * - 1 - - cuml.common.logger.level_enum.critical - - Enables only critical messages - * - 2 - - cuml.common.logger.level_enum.error - - Enables all messages up to and including errors. - * - 3 - - cuml.common.logger.level_enum.warn - - Enables all messages up to and including warnings. - * - 4 or False - - cuml.common.logger.level_enum.info - - Enables all messages up to and including information messages. - * - 5 or True - - cuml.common.logger.level_enum.debug - - Enables all messages up to and including debug messages. - * - 6 - - cuml.common.logger.level_enum.trace - - Enables all messages up to and including trace messages. - - -Preprocessing, Metrics, and Utilities -===================================== - -Model Selection and Data Splitting ----------------------------------- - - .. autofunction:: cuml.model_selection.train_test_split - - .. autoclass:: cuml.model_selection.KFold - :members: - -Feature and Label Encoding (Single-GPU) ---------------------------------------- - - .. autoclass:: cuml.preprocessing.LabelEncoder.LabelEncoder - :members: - - .. autoclass:: cuml.preprocessing.LabelBinarizer - :members: - - .. autofunction:: cuml.preprocessing.label_binarize - - .. autoclass:: cuml.preprocessing.OneHotEncoder - :members: - - .. autoclass:: cuml.preprocessing.TargetEncoder.TargetEncoder - :members: - -Feature Scaling and Normalization (Single-GPU) ----------------------------------------------- -.. autoclass:: cuml.preprocessing.MaxAbsScaler - :members: -.. autoclass:: cuml.preprocessing.MinMaxScaler - :members: -.. autoclass:: cuml.preprocessing.Normalizer - :members: -.. autoclass:: cuml.preprocessing.RobustScaler - :members: -.. autoclass:: cuml.preprocessing.StandardScaler - :members: -.. autofunction:: cuml.preprocessing.maxabs_scale -.. autofunction:: cuml.preprocessing.minmax_scale -.. autofunction:: cuml.preprocessing.normalize -.. autofunction:: cuml.preprocessing.robust_scale -.. autofunction:: cuml.preprocessing.scale - -Other preprocessing methods (Single-GPU) ----------------------------------------- -.. autoclass:: cuml.preprocessing.Binarizer - :members: -.. autoclass:: cuml.preprocessing.FunctionTransformer - :members: -.. autoclass:: cuml.preprocessing.KBinsDiscretizer - :members: -.. autoclass:: cuml.preprocessing.KernelCenterer - :members: -.. autoclass:: cuml.preprocessing.MissingIndicator - :members: -.. autoclass:: cuml.preprocessing.PolynomialFeatures - :members: -.. autoclass:: cuml.preprocessing.PowerTransformer - :members: -.. autoclass:: cuml.preprocessing.QuantileTransformer - :members: -.. autoclass:: cuml.preprocessing.SimpleImputer - :members: -.. autofunction:: cuml.preprocessing.add_dummy_feature -.. autofunction:: cuml.preprocessing.binarize - -.. automodule:: cuml.compose - :members: ColumnTransformer, make_column_transformer, make_column_selector - -Text Preprocessing (Single-GPU) -------------------------------- - .. autoclass:: cuml.preprocessing.text.stem.PorterStemmer - :members: - -Feature and Label Encoding (Dask-based Multi-GPU) -------------------------------------------------- - - .. autoclass:: cuml.dask.preprocessing.LabelBinarizer - :members: - - .. autoclass:: cuml.dask.preprocessing.LabelEncoder.LabelEncoder - :members: - - .. autoclass:: cuml.dask.preprocessing.OneHotEncoder - :members: - -Feature Extraction (Single-GPU) -------------------------------- - - .. autoclass:: cuml.feature_extraction.text.CountVectorizer - :members: - - .. autoclass:: cuml.feature_extraction.text.HashingVectorizer - :members: - - .. autoclass:: cuml.feature_extraction.text.TfidfVectorizer - :members: - -Feature Extraction (Dask-based Multi-GPU) ------------------------------------------ - .. autoclass:: cuml.dask.feature_extraction.text.TfidfTransformer - :members: - -Dataset Generation (Single-GPU) -------------------------------- - .. glossary:: - random_state - Determines random number generation for dataset creation. Pass an int - for reproducible output across multiple function calls. - .. autofunction:: cuml.datasets.make_blobs - .. autofunction:: cuml.datasets.make_classification - .. autofunction:: cuml.datasets.make_regression - .. autofunction:: cuml.datasets.make_arima - - -Dataset Generation (Dask-based Multi-GPU) ------------------------------------------ - .. automodule:: cuml.dask.datasets.blobs - :members: - - .. automodule:: cuml.dask.datasets.classification - :members: - - .. automodule:: cuml.dask.datasets.regression - :members: - - -Metrics (regression, classification, and distance) --------------------------------------------------- - - .. automodule:: cuml.metrics.regression - :members: - - .. autofunction:: cuml.metrics.accuracy_score - - .. autofunction:: cuml.metrics.confusion_matrix - - .. autofunction:: cuml.metrics.kl_divergence - - .. autofunction:: cuml.metrics.log_loss - - .. autofunction:: cuml.metrics.roc_auc_score - - .. autofunction:: cuml.metrics.precision_recall_curve - - .. automodule:: cuml.metrics.pairwise_distances - :members: - - .. automodule:: cuml.metrics.pairwise_kernels - :members: - - -Metrics (clustering and manifold learning) ------------------------------------------- - - .. autofunction:: cuml.metrics.trustworthiness - - .. autofunction:: cuml.metrics.cluster.adjusted_rand_score - - .. autofunction:: cuml.metrics.cluster.entropy - - .. autofunction:: cuml.metrics.cluster.homogeneity_score - - .. autofunction:: cuml.metrics.cluster.silhouette_score - - .. autofunction:: cuml.metrics.cluster.silhouette_samples - - .. autofunction:: cuml.metrics.cluster.completeness_score - - .. autofunction:: cuml.metrics.cluster.mutual_info_score - - .. autofunction:: cuml.metrics.cluster.v_measure_score - -Benchmarking ------------- - - .. automodule:: cuml.benchmark.algorithms - :members: - - .. automodule:: cuml.benchmark.runners - :members: - - .. automodule:: cuml.benchmark.datagen - :members: - - -Regression and Classification -============================= - -Linear Regression ------------------ - -.. autoclass:: cuml.LinearRegression - :members: - -Logistic Regression -------------------- - -.. autoclass:: cuml.LogisticRegression - :members: - -Ridge Regression ----------------- - -.. autoclass:: cuml.Ridge - :members: - -Lasso Regression ----------------- - -.. autoclass:: cuml.Lasso - :members: - -ElasticNet Regression ---------------------- - -.. autoclass:: cuml.ElasticNet - :members: - -Mini Batch SGD Classifier -------------------------- - -.. autoclass:: cuml.MBSGDClassifier - :members: - -Mini Batch SGD Regressor ------------------------- - -.. autoclass:: cuml.MBSGDRegressor - :members: - -Multiclass Classification -------------------------- - -.. autoclass:: cuml.multiclass.OneVsOneClassifier - :members: - -.. autoclass:: cuml.multiclass.OneVsRestClassifier - :members: - -Naive Bayes ------------ - -.. autoclass:: cuml.naive_bayes.MultinomialNB - :members: - -.. autoclass:: cuml.naive_bayes.BernoulliNB - :members: - -.. autoclass:: cuml.naive_bayes.ComplementNB - :members: - -.. autoclass:: cuml.naive_bayes.GaussianNB - :members: - -.. autoclass:: cuml.naive_bayes.CategoricalNB - :members: - -Stochastic Gradient Descent ---------------------------- - -.. autoclass:: cuml.SGD - :members: - -Random Forest -------------- - -.. autoclass:: cuml.ensemble.RandomForestClassifier - :members: - -.. autoclass:: cuml.ensemble.RandomForestRegressor - :members: - -Forest Inferencing ------------------- - -.. autoclass:: cuml.ForestInference - :members: - :inherited-members: - -Coordinate Descent ------------------- - -.. autoclass:: cuml.CD - :members: - -Quasi-Newton ------------- - -.. autoclass:: cuml.QN - :members: - -Support Vector Machines ------------------------ - -.. autoclass:: cuml.svm.SVR - :members: - -.. autoclass:: cuml.svm.SVC - :members: decision_function, fit, predict, predict_log_proba, predict_proba - -.. autoclass:: cuml.svm.LinearSVC - :members: - -.. autoclass:: cuml.svm.LinearSVR - :members: - -Nearest Neighbors Classification --------------------------------- - -.. autoclass:: cuml.neighbors.KNeighborsClassifier - :members: - :noindex: - -Nearest Neighbors Regression ----------------------------- - -.. autoclass:: cuml.neighbors.KNeighborsRegressor - :members: - :noindex: - -Kernel Ridge Regression ------------------------ - -.. autoclass:: cuml.KernelRidge - :members: - - -Clustering -========== - -K-Means Clustering ------------------- - -.. autoclass:: cuml.KMeans - :members: - -DBSCAN ------- - -.. autoclass:: cuml.DBSCAN - :members: - -Agglomerative Clustering ------------------------- - -.. autoclass:: cuml.AgglomerativeClustering - :members: - - -HDBSCAN -------- -.. autoclass:: cuml.cluster.hdbscan.HDBSCAN - :members: - -.. autofunction:: cuml.cluster.hdbscan.all_points_membership_vectors - -.. autofunction:: cuml.cluster.hdbscan.membership_vector - -.. autofunction:: cuml.cluster.hdbscan.approximate_predict - -Spectral Clustering -------------------- -.. autoclass:: cuml.cluster.SpectralClustering - :members: - -.. autofunction:: cuml.cluster.spectral_clustering - - -Dimensionality Reduction and Manifold Learning -============================================== - -Principal Component Analysis ------------------------------ - -.. autoclass:: cuml.PCA - :members: - -Incremental PCA ---------------- -.. autoclass:: cuml.IncrementalPCA - :members: - -Truncated SVD --------------- - -.. autoclass:: cuml.TruncatedSVD - :members: - -UMAP ----- - -.. autoclass:: cuml.UMAP - :members: - -.. autofunction:: cuml.manifold.umap.fuzzy_simplicial_set - -.. autofunction:: cuml.manifold.umap.simplicial_set_embedding - -.. autofunction:: cuml.manifold.umap.find_ab_params - - -Random Projections ------------------- - -.. autoclass:: cuml.random_projection.GaussianRandomProjection - :members: - -.. autoclass:: cuml.random_projection.SparseRandomProjection - :members: - -.. autofunction:: cuml.random_projection.johnson_lindenstrauss_min_dim - - -TSNE ----- - -.. autoclass:: cuml.TSNE - :members: - -Spectral Embedding ------------------- - -.. autoclass:: cuml.manifold.SpectralEmbedding - :members: - -.. autofunction:: cuml.manifold.spectral_embedding - -Covariance Estimation -===================== - -Ledoit-Wolf Shrinkage ---------------------- - -.. autoclass:: cuml.covariance.LedoitWolf - :members: - -Neighbors -========== - -Nearest Neighbors ------------------ - -.. autoclass:: cuml.neighbors.NearestNeighbors - :members: - -Nearest Neighbors Classification --------------------------------- - -.. autoclass:: cuml.neighbors.KNeighborsClassifier - :members: - -Nearest Neighbors Regression ----------------------------- - -.. autoclass:: cuml.neighbors.KNeighborsRegressor - :members: - -Kernel Density Estimation -------------------------- - -.. autoclass:: cuml.neighbors.KernelDensity - :members: - -Time Series -=========== - -HoltWinters ------------ - -.. autoclass:: cuml.ExponentialSmoothing - :members: - -ARIMA ------ - -.. autoclass:: cuml.tsa.ARIMA - :members: - -.. autoclass:: cuml.tsa.auto_arima.AutoARIMA - :members: - -Model Explainability -==================== - -SHAP Kernel Explainer ---------------------- - -.. autoclass:: cuml.explainer.KernelExplainer - :members: - -SHAP Permutation Explainer --------------------------- - -.. autoclass:: cuml.explainer.PermutationExplainer - :members: - - -Multi-Node, Multi-GPU Algorithms -================================ - -DBSCAN Clustering ------------------ - -.. autoclass:: cuml.dask.cluster.DBSCAN - :members: - -K-Means Clustering ------------------- - -.. autoclass:: cuml.dask.cluster.KMeans - :members: - -Nearest Neighbors ------------------ - -.. autoclass:: cuml.dask.neighbors.NearestNeighbors - :members: - -.. autoclass:: cuml.dask.neighbors.KNeighborsRegressor - :members: - -.. autoclass:: cuml.dask.neighbors.KNeighborsClassifier - :members: - - -Principal Component Analysis ----------------------------- -.. autoclass:: cuml.dask.decomposition.PCA - :members: - -Random Forest -------------- - -.. autoclass:: cuml.dask.ensemble.RandomForestClassifier - :members: - -.. autoclass:: cuml.dask.ensemble.RandomForestRegressor - :members: - -Truncated SVD -------------- - -.. autoclass:: cuml.dask.decomposition.TruncatedSVD - :members: - -Manifold --------- - -.. autoclass:: cuml.dask.manifold.UMAP - :members: - -Linear Models -------------- - -.. autoclass:: cuml.dask.linear_model.LinearRegression - :members: - -.. autoclass:: cuml.dask.linear_model.Ridge - :members: - -.. autoclass:: cuml.dask.linear_model.Lasso - :members: - -.. autoclass:: cuml.dask.linear_model.ElasticNet - :members: - -Naive Bayes ------------ - -.. autoclass:: cuml.dask.naive_bayes.MultinomialNB - :members: - -Solvers -------- - -.. autoclass:: cuml.dask.solvers.CD - :members: - -Dask Base Classes and Mixins ----------------------------- -.. autoclass:: cuml.dask.common.base.BaseEstimator - :members: - -.. autoclass:: cuml.dask.common.base.DelayedParallelFunc - :members: - -.. autoclass:: cuml.dask.common.base.DelayedPredictionMixin - :members: - -.. autoclass:: cuml.dask.common.base.DelayedTransformMixin - :members: - -.. autoclass:: cuml.dask.common.base.DelayedInverseTransformMixin - :members: - -cuml.accel -========== - -.. autofunction:: cuml.accel.install - -.. autofunction:: cuml.accel.enabled - -.. autofunction:: cuml.accel.profile - -.. autofunction:: cuml.accel.is_proxy - -Experimental -============ - -.. warning:: The `cuml.experimental` module contains features that are still - under development. It is not recommended to depend on features in this - module as they may change in future releases. - -.. note:: Due to the nature of this module, it is not imported by default by - the root `cuml` package. Each `experimental` submodule must be imported - separately. - -Linear Models -------------- -.. autoclass:: cuml.experimental.linear_model.Lars - :members: - -Model Explainability --------------------- -.. autoclass:: cuml.explainer.TreeExplainer - :members: diff --git a/docs/source/api/cuml.accel.rst b/docs/source/api/cuml.accel.rst new file mode 100644 index 0000000000..e99bc7387c --- /dev/null +++ b/docs/source/api/cuml.accel.rst @@ -0,0 +1,16 @@ +cuml.accel +========== + +.. automodule:: cuml.accel + +.. currentmodule:: cuml.accel + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + install + enabled + profile + is_proxy diff --git a/docs/source/api/cuml.benchmark.rst b/docs/source/api/cuml.benchmark.rst new file mode 100644 index 0000000000..f0e05bddcc --- /dev/null +++ b/docs/source/api/cuml.benchmark.rst @@ -0,0 +1,20 @@ +cuml.benchmark +============== + +Algorithms +---------- + +.. automodule:: cuml.benchmark.algorithms + :members: + +Runners +------- + +.. automodule:: cuml.benchmark.runners + :members: + +Data Generation +--------------- + +.. automodule:: cuml.benchmark.datagen + :members: diff --git a/docs/source/api/cuml.cluster.rst b/docs/source/api/cuml.cluster.rst new file mode 100644 index 0000000000..2e16c51187 --- /dev/null +++ b/docs/source/api/cuml.cluster.rst @@ -0,0 +1,21 @@ +cuml.cluster +============ + +.. automodule:: cuml.cluster + +.. currentmodule:: cuml.cluster + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + AgglomerativeClustering + DBSCAN + KMeans + SpectralClustering + spectral_clustering + hdbscan.HDBSCAN + hdbscan.all_points_membership_vectors + hdbscan.membership_vector + hdbscan.approximate_predict diff --git a/docs/source/api/cuml.compose.rst b/docs/source/api/cuml.compose.rst new file mode 100644 index 0000000000..b68655761f --- /dev/null +++ b/docs/source/api/cuml.compose.rst @@ -0,0 +1,15 @@ +cuml.compose +============ + +.. automodule:: cuml.compose + +.. currentmodule:: cuml.compose + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + ColumnTransformer + make_column_transformer + make_column_selector diff --git a/docs/source/api/cuml.covariance.rst b/docs/source/api/cuml.covariance.rst new file mode 100644 index 0000000000..1e4e166436 --- /dev/null +++ b/docs/source/api/cuml.covariance.rst @@ -0,0 +1,13 @@ +cuml.covariance +=============== + +.. automodule:: cuml.covariance + +.. currentmodule:: cuml.covariance + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + LedoitWolf diff --git a/docs/source/api/cuml.dask.rst b/docs/source/api/cuml.dask.rst new file mode 100644 index 0000000000..9135a7a056 --- /dev/null +++ b/docs/source/api/cuml.dask.rst @@ -0,0 +1,165 @@ +cuml.dask +========= + +.. automodule:: cuml.dask + +Multi-node, multi-GPU algorithms using Dask. + +Cluster +------- + +.. currentmodule:: cuml.dask.cluster + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + DBSCAN + KMeans + +Decomposition +------------- + +.. currentmodule:: cuml.dask.decomposition + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + PCA + TruncatedSVD + +Ensemble +-------- + +.. currentmodule:: cuml.dask.ensemble + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + RandomForestClassifier + RandomForestRegressor + +Linear Models +------------- + +.. currentmodule:: cuml.dask.linear_model + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + LinearRegression + Ridge + Lasso + ElasticNet + +Manifold +-------- + +.. currentmodule:: cuml.dask.manifold + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + UMAP + +Naive Bayes +----------- + +.. currentmodule:: cuml.dask.naive_bayes + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + MultinomialNB + +Neighbors +--------- + +.. currentmodule:: cuml.dask.neighbors + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + NearestNeighbors + KNeighborsClassifier + KNeighborsRegressor + +Preprocessing +------------- + +.. currentmodule:: cuml.dask.preprocessing + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + LabelBinarizer + OneHotEncoder + +Feature Extraction +------------------ + +.. currentmodule:: cuml.dask.feature_extraction.text + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + TfidfTransformer + +Datasets +-------- + +.. currentmodule:: cuml.dask.datasets + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + make_blobs + make_classification + make_regression + +Solvers +------- + +.. currentmodule:: cuml.dask.solvers + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + CD + +Base Classes and Mixins +----------------------- + +.. currentmodule:: cuml.dask.common.base + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + BaseEstimator + DelayedParallelFunc + DelayedPredictionMixin + DelayedTransformMixin + DelayedInverseTransformMixin diff --git a/docs/source/api/cuml.datasets.rst b/docs/source/api/cuml.datasets.rst new file mode 100644 index 0000000000..4e09665058 --- /dev/null +++ b/docs/source/api/cuml.datasets.rst @@ -0,0 +1,16 @@ +cuml.datasets +============= + +.. automodule:: cuml.datasets + +.. currentmodule:: cuml.datasets + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + make_blobs + make_classification + make_regression + make_arima diff --git a/docs/source/api/cuml.decomposition.rst b/docs/source/api/cuml.decomposition.rst new file mode 100644 index 0000000000..9a005dae90 --- /dev/null +++ b/docs/source/api/cuml.decomposition.rst @@ -0,0 +1,15 @@ +cuml.decomposition +================== + +.. automodule:: cuml.decomposition + +.. currentmodule:: cuml.decomposition + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + PCA + IncrementalPCA + TruncatedSVD diff --git a/docs/source/api/cuml.ensemble.rst b/docs/source/api/cuml.ensemble.rst new file mode 100644 index 0000000000..d59b938771 --- /dev/null +++ b/docs/source/api/cuml.ensemble.rst @@ -0,0 +1,14 @@ +cuml.ensemble +============= + +.. automodule:: cuml.ensemble + +.. currentmodule:: cuml.ensemble + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + RandomForestClassifier + RandomForestRegressor diff --git a/docs/source/api/cuml.experimental.rst b/docs/source/api/cuml.experimental.rst new file mode 100644 index 0000000000..50c852c51b --- /dev/null +++ b/docs/source/api/cuml.experimental.rst @@ -0,0 +1,22 @@ +cuml.experimental +================= + +.. warning:: The ``cuml.experimental`` module contains features that are still + under development. It is not recommended to depend on features in this + module as they may change in future releases. + +.. note:: Due to the nature of this module, it is not imported by default by + the root ``cuml`` package. Each ``experimental`` submodule must be imported + separately. + +Linear Models +------------- + +.. currentmodule:: cuml.experimental.linear_model + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + Lars diff --git a/docs/source/api/cuml.explainer.rst b/docs/source/api/cuml.explainer.rst new file mode 100644 index 0000000000..0f20d3797a --- /dev/null +++ b/docs/source/api/cuml.explainer.rst @@ -0,0 +1,15 @@ +cuml.explainer +============== + +.. automodule:: cuml.explainer + +.. currentmodule:: cuml.explainer + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + KernelExplainer + PermutationExplainer + TreeExplainer diff --git a/docs/source/api/cuml.feature_extraction.rst b/docs/source/api/cuml.feature_extraction.rst new file mode 100644 index 0000000000..601d82b8f6 --- /dev/null +++ b/docs/source/api/cuml.feature_extraction.rst @@ -0,0 +1,18 @@ +cuml.feature_extraction +======================= + +.. automodule:: cuml.feature_extraction + +From text +--------- + +.. currentmodule:: cuml.feature_extraction.text + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + CountVectorizer + HashingVectorizer + TfidfVectorizer diff --git a/docs/source/api/cuml.fil.rst b/docs/source/api/cuml.fil.rst new file mode 100644 index 0000000000..3f80908f93 --- /dev/null +++ b/docs/source/api/cuml.fil.rst @@ -0,0 +1,20 @@ +cuml.fil +======== + +Forest Inference Library (FIL) for fast inference of tree-based models. + +.. Note: automodule is needed here (not just currentmodule) because cuml.fil + is a Cython extension module, not a Python package. Without automodule, + Sphinx cannot create a cross-reference target for :mod:`cuml.fil` and + links to this module page from the API index would be broken. + +.. automodule:: cuml.fil + +.. currentmodule:: cuml.fil + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + ForestInference diff --git a/docs/source/api/cuml.kernel_ridge.rst b/docs/source/api/cuml.kernel_ridge.rst new file mode 100644 index 0000000000..87d26c37eb --- /dev/null +++ b/docs/source/api/cuml.kernel_ridge.rst @@ -0,0 +1,13 @@ +cuml.kernel_ridge +================= + +.. automodule:: cuml.kernel_ridge + +.. currentmodule:: cuml.kernel_ridge + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + KernelRidge diff --git a/docs/source/api/cuml.linear_model.rst b/docs/source/api/cuml.linear_model.rst new file mode 100644 index 0000000000..063546c148 --- /dev/null +++ b/docs/source/api/cuml.linear_model.rst @@ -0,0 +1,19 @@ +cuml.linear_model +================= + +.. automodule:: cuml.linear_model + +.. currentmodule:: cuml.linear_model + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + LinearRegression + LogisticRegression + Ridge + Lasso + ElasticNet + MBSGDClassifier + MBSGDRegressor diff --git a/docs/source/api/cuml.manifold.rst b/docs/source/api/cuml.manifold.rst new file mode 100644 index 0000000000..21ff6b01a1 --- /dev/null +++ b/docs/source/api/cuml.manifold.rst @@ -0,0 +1,19 @@ +cuml.manifold +============= + +.. automodule:: cuml.manifold + +.. currentmodule:: cuml.manifold + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + UMAP + TSNE + SpectralEmbedding + spectral_embedding + umap.fuzzy_simplicial_set + umap.simplicial_set_embedding + umap.find_ab_params diff --git a/docs/source/api/cuml.metrics.rst b/docs/source/api/cuml.metrics.rst new file mode 100644 index 0000000000..f5e96b0706 --- /dev/null +++ b/docs/source/api/cuml.metrics.rst @@ -0,0 +1,66 @@ +cuml.metrics +============ + +.. automodule:: cuml.metrics + +Classification and Distance Metrics +------------------------------------ + +.. currentmodule:: cuml.metrics + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + accuracy_score + confusion_matrix + kl_divergence + log_loss + roc_auc_score + precision_recall_curve + trustworthiness + +Regression Metrics +------------------ + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + mean_absolute_error + mean_squared_error + mean_squared_log_error + median_absolute_error + r2_score + +Clustering Metrics +------------------ + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + cluster.adjusted_rand_score + cluster.entropy + cluster.homogeneity_score + cluster.silhouette_score + cluster.silhouette_samples + cluster.completeness_score + cluster.mutual_info_score + cluster.v_measure_score + +Pairwise Distances and Kernels +------------------------------ + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + pairwise_distances + sparse_pairwise_distances + nan_euclidean_distances + pairwise_kernels diff --git a/docs/source/api/cuml.model_selection.rst b/docs/source/api/cuml.model_selection.rst new file mode 100644 index 0000000000..24757f6b2b --- /dev/null +++ b/docs/source/api/cuml.model_selection.rst @@ -0,0 +1,14 @@ +cuml.model_selection +==================== + +.. automodule:: cuml.model_selection + +.. currentmodule:: cuml.model_selection + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + train_test_split + KFold diff --git a/docs/source/api/cuml.multiclass.rst b/docs/source/api/cuml.multiclass.rst new file mode 100644 index 0000000000..8c6a7e34a9 --- /dev/null +++ b/docs/source/api/cuml.multiclass.rst @@ -0,0 +1,14 @@ +cuml.multiclass +=============== + +.. automodule:: cuml.multiclass + +.. currentmodule:: cuml.multiclass + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + OneVsOneClassifier + OneVsRestClassifier diff --git a/docs/source/api/cuml.naive_bayes.rst b/docs/source/api/cuml.naive_bayes.rst new file mode 100644 index 0000000000..0d3116b3eb --- /dev/null +++ b/docs/source/api/cuml.naive_bayes.rst @@ -0,0 +1,17 @@ +cuml.naive_bayes +================ + +.. automodule:: cuml.naive_bayes + +.. currentmodule:: cuml.naive_bayes + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + BernoulliNB + CategoricalNB + ComplementNB + GaussianNB + MultinomialNB diff --git a/docs/source/api/cuml.neighbors.rst b/docs/source/api/cuml.neighbors.rst new file mode 100644 index 0000000000..61647bbd56 --- /dev/null +++ b/docs/source/api/cuml.neighbors.rst @@ -0,0 +1,16 @@ +cuml.neighbors +============== + +.. automodule:: cuml.neighbors + +.. currentmodule:: cuml.neighbors + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + NearestNeighbors + KNeighborsClassifier + KNeighborsRegressor + KernelDensity diff --git a/docs/source/api/cuml.preprocessing.rst b/docs/source/api/cuml.preprocessing.rst new file mode 100644 index 0000000000..e506452774 --- /dev/null +++ b/docs/source/api/cuml.preprocessing.rst @@ -0,0 +1,50 @@ +cuml.preprocessing +================== + +.. automodule:: cuml.preprocessing + +.. currentmodule:: cuml.preprocessing + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + Binarizer + FunctionTransformer + KBinsDiscretizer + KernelCenterer + LabelBinarizer + LabelEncoder + MaxAbsScaler + MinMaxScaler + MissingIndicator + Normalizer + OneHotEncoder + PolynomialFeatures + PowerTransformer + QuantileTransformer + RobustScaler + SimpleImputer + StandardScaler + TargetEncoder + add_dummy_feature + binarize + label_binarize + maxabs_scale + minmax_scale + normalize + robust_scale + scale + +Text Preprocessing +------------------ + +.. currentmodule:: cuml.preprocessing.text.stem + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + PorterStemmer diff --git a/docs/source/api/cuml.random_projection.rst b/docs/source/api/cuml.random_projection.rst new file mode 100644 index 0000000000..aedd92740d --- /dev/null +++ b/docs/source/api/cuml.random_projection.rst @@ -0,0 +1,15 @@ +cuml.random_projection +====================== + +.. automodule:: cuml.random_projection + +.. currentmodule:: cuml.random_projection + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + GaussianRandomProjection + SparseRandomProjection + johnson_lindenstrauss_min_dim diff --git a/docs/source/api/cuml.rst b/docs/source/api/cuml.rst new file mode 100644 index 0000000000..476c46e1aa --- /dev/null +++ b/docs/source/api/cuml.rst @@ -0,0 +1,56 @@ +cuml +==== + +.. automodule:: cuml + +.. _output-data-type-configuration: + +Output Data Type Configuration +------------------------------ + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + set_global_output_type + using_output_type + +.. _verbosity-levels: + +Verbosity Levels +---------------- + +cuML follows a verbosity model similar to Scikit-learn's: The verbose parameter +can be a boolean, or a numeric value, and higher numeric values mean more +verbosity. The exact values can be set directly, or through the +cuml.common.logger module, and they are: + +.. list-table:: Verbosity Levels + :widths: 25 25 50 + :header-rows: 1 + + * - Numeric value + - cuml.common.logger value + - Verbosity level + * - 0 + - cuml.common.logger.level_enum.off + - Disables all log messages. + * - 1 + - cuml.common.logger.level_enum.critical + - Enables only critical messages. + * - 2 + - cuml.common.logger.level_enum.error + - Enables all messages up to and including errors. + * - 3 + - cuml.common.logger.level_enum.warn + - Enables all messages up to and including warnings. + * - 4 or False + - cuml.common.logger.level_enum.info + - Enables all messages up to and including information messages. + * - 5 or True + - cuml.common.logger.level_enum.debug + - Enables all messages up to and including debug messages. + * - 6 + - cuml.common.logger.level_enum.trace + - Enables all messages up to and including trace messages. diff --git a/docs/source/api/cuml.solvers.rst b/docs/source/api/cuml.solvers.rst new file mode 100644 index 0000000000..53695148c3 --- /dev/null +++ b/docs/source/api/cuml.solvers.rst @@ -0,0 +1,15 @@ +cuml.solvers +============ + +.. automodule:: cuml.solvers + +.. currentmodule:: cuml.solvers + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + CD + QN + SGD diff --git a/docs/source/api/cuml.svm.rst b/docs/source/api/cuml.svm.rst new file mode 100644 index 0000000000..6963c270e2 --- /dev/null +++ b/docs/source/api/cuml.svm.rst @@ -0,0 +1,16 @@ +cuml.svm +======== + +.. automodule:: cuml.svm + +.. currentmodule:: cuml.svm + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + SVC + SVR + LinearSVC + LinearSVR diff --git a/docs/source/api/cuml.tsa.rst b/docs/source/api/cuml.tsa.rst new file mode 100644 index 0000000000..7263f4a8dc --- /dev/null +++ b/docs/source/api/cuml.tsa.rst @@ -0,0 +1,15 @@ +cuml.tsa +======== + +.. automodule:: cuml.tsa + +.. currentmodule:: cuml.tsa + +.. autosummary:: + :nosignatures: + :toctree: generated/ + :template: base.rst + + ARIMA + auto_arima.AutoARIMA + ExponentialSmoothing diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst new file mode 100644 index 0000000000..59053a86a9 --- /dev/null +++ b/docs/source/api/index.rst @@ -0,0 +1,546 @@ +.. _api_ref: + +============= +API Reference +============= + +This is the class and function reference of cuML. Please refer to the +:doc:`User Guide ` for further details, as the raw specifications +of classes and functions may not be enough to give full guidelines on their +use. + +.. toctree:: + :maxdepth: 2 + :hidden: + + cuml + cuml.accel + cuml.benchmark + cuml.cluster + cuml.compose + cuml.covariance + cuml.dask + cuml.datasets + cuml.decomposition + cuml.ensemble + cuml.experimental + cuml.explainer + cuml.feature_extraction + cuml.fil + cuml.kernel_ridge + cuml.linear_model + cuml.manifold + cuml.metrics + cuml.model_selection + cuml.multiclass + cuml.naive_bayes + cuml.neighbors + cuml.preprocessing + cuml.random_projection + cuml.solvers + cuml.svm + cuml.tsa + + +Module Configuration +==================== + +Output Data Type Configuration +------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.set_global_output_type` + - Set global output type for cuML estimators. + - :mod:`cuml` + * - :obj:`~cuml.using_output_type` + - Context manager to temporarily set output type. + - :mod:`cuml` + + +Preprocessing, Metrics, and Utilities +===================================== + +Model Selection and Data Splitting +---------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.model_selection.KFold` + - K-Fold cross-validator. + - :mod:`cuml.model_selection` + * - :obj:`~cuml.model_selection.train_test_split` + - Split arrays into random train and test subsets. + - :mod:`cuml.model_selection` + +Feature and Label Encoding (Single-GPU) +--------------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.preprocessing.LabelBinarizer` + - Binarize labels in a one-vs-all fashion. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.LabelEncoder` + - Encode target labels with value between 0 and n_classes-1. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.OneHotEncoder` + - Encode categorical features as a one-hot numeric array. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.TargetEncoder` + - Target Encoder for regression and classification targets. + - :mod:`cuml.preprocessing` + +Feature Scaling and Normalization (Single-GPU) +---------------------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.preprocessing.MaxAbsScaler` + - Scale each feature by its maximum absolute value. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.MinMaxScaler` + - Transform features by scaling each feature to a given range. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.Normalizer` + - Normalize samples individually to unit norm. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.RobustScaler` + - Scale features using statistics that are robust to outliers. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.StandardScaler` + - Standardize features by removing the mean and scaling to unit variance. + - :mod:`cuml.preprocessing` + +Other preprocessing methods (Single-GPU) +---------------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.compose.ColumnTransformer` + - Applies transformers to columns of an array or DataFrame. + - :mod:`cuml.compose` + * - :obj:`~cuml.preprocessing.PolynomialFeatures` + - Generate polynomial and interaction features. + - :mod:`cuml.preprocessing` + * - :obj:`~cuml.preprocessing.SimpleImputer` + - Univariate imputer for completing missing values. + - :mod:`cuml.preprocessing` + +Feature Extraction (Single-GPU) +------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.feature_extraction.text.CountVectorizer` + - Convert a collection of text documents to a matrix of token counts. + - :mod:`cuml.feature_extraction` + * - :obj:`~cuml.feature_extraction.text.HashingVectorizer` + - Convert a collection of text documents to a matrix of token occurrences. + - :mod:`cuml.feature_extraction` + * - :obj:`~cuml.feature_extraction.text.TfidfVectorizer` + - Convert a collection of raw documents to a matrix of TF-IDF features. + - :mod:`cuml.feature_extraction` + +Dataset Generation (Single-GPU) +------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.datasets.make_blobs` + - Generate isotropic Gaussian blobs for clustering. + - :mod:`cuml.datasets` + * - :obj:`~cuml.datasets.make_classification` + - Generate a random classification problem. + - :mod:`cuml.datasets` + * - :obj:`~cuml.datasets.make_regression` + - Generate a random regression problem. + - :mod:`cuml.datasets` + +Metrics (regression, classification, and distance) +--------------------------------------------------- + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.metrics.accuracy_score` + - Accuracy classification score. + - :mod:`cuml.metrics` + * - :obj:`~cuml.metrics.confusion_matrix` + - Compute confusion matrix. + - :mod:`cuml.metrics` + * - :obj:`~cuml.metrics.roc_auc_score` + - Compute Area Under the ROC Curve. + - :mod:`cuml.metrics` + + +Regression and Classification +============================= + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.naive_bayes.BernoulliNB` + - Naive Bayes classifier for multivariate Bernoulli models. + - :mod:`cuml.naive_bayes` + * - :obj:`~cuml.naive_bayes.CategoricalNB` + - Naive Bayes classifier for categorical features. + - :mod:`cuml.naive_bayes` + * - :obj:`~cuml.solvers.CD` + - Coordinate Descent solver. + - :mod:`cuml.solvers` + * - :obj:`~cuml.naive_bayes.ComplementNB` + - Complement Naive Bayes classifier. + - :mod:`cuml.naive_bayes` + * - :obj:`~cuml.linear_model.ElasticNet` + - ElasticNet regression. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.fil.ForestInference` + - Forest Inference for fast prediction of tree-based models. + - :mod:`cuml.fil` + * - :obj:`~cuml.naive_bayes.GaussianNB` + - Gaussian Naive Bayes. + - :mod:`cuml.naive_bayes` + * - :obj:`~cuml.kernel_ridge.KernelRidge` + - Kernel Ridge Regression. + - :mod:`cuml.kernel_ridge` + * - :obj:`~cuml.neighbors.KNeighborsClassifier` + - K-Nearest Neighbors classifier. + - :mod:`cuml.neighbors` + * - :obj:`~cuml.neighbors.KNeighborsRegressor` + - K-Nearest Neighbors regressor. + - :mod:`cuml.neighbors` + * - :obj:`~cuml.linear_model.Lasso` + - Lasso regression. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.linear_model.LinearRegression` + - Ordinary least squares Linear Regression. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.svm.LinearSVC` + - Linear Support Vector Classification. + - :mod:`cuml.svm` + * - :obj:`~cuml.svm.LinearSVR` + - Linear Support Vector Regression. + - :mod:`cuml.svm` + * - :obj:`~cuml.linear_model.LogisticRegression` + - Logistic Regression classifier. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.linear_model.MBSGDClassifier` + - Mini Batch SGD Classifier. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.linear_model.MBSGDRegressor` + - Mini Batch SGD Regressor. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.naive_bayes.MultinomialNB` + - Naive Bayes classifier for multinomial models. + - :mod:`cuml.naive_bayes` + * - :obj:`~cuml.multiclass.OneVsOneClassifier` + - One-vs-one multiclass strategy. + - :mod:`cuml.multiclass` + * - :obj:`~cuml.multiclass.OneVsRestClassifier` + - One-vs-the-rest multiclass strategy. + - :mod:`cuml.multiclass` + * - :obj:`~cuml.solvers.QN` + - Quasi-Newton solver. + - :mod:`cuml.solvers` + * - :obj:`~cuml.ensemble.RandomForestClassifier` + - Random Forest classifier. + - :mod:`cuml.ensemble` + * - :obj:`~cuml.ensemble.RandomForestRegressor` + - Random Forest regressor. + - :mod:`cuml.ensemble` + * - :obj:`~cuml.linear_model.Ridge` + - Ridge regression. + - :mod:`cuml.linear_model` + * - :obj:`~cuml.solvers.SGD` + - Stochastic Gradient Descent solver. + - :mod:`cuml.solvers` + * - :obj:`~cuml.svm.SVC` + - C-Support Vector Classification. + - :mod:`cuml.svm` + * - :obj:`~cuml.svm.SVR` + - Epsilon-Support Vector Regression. + - :mod:`cuml.svm` + + +Clustering +========== + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.cluster.AgglomerativeClustering` + - Agglomerative Clustering. + - :mod:`cuml.cluster` + * - :obj:`~cuml.cluster.DBSCAN` + - Density-Based Spatial Clustering of Applications with Noise. + - :mod:`cuml.cluster` + * - :obj:`~cuml.cluster.hdbscan.HDBSCAN` + - Hierarchical DBSCAN clustering. + - :mod:`cuml.cluster` + * - :obj:`~cuml.cluster.KMeans` + - K-Means clustering. + - :mod:`cuml.cluster` + * - :obj:`~cuml.cluster.SpectralClustering` + - Spectral clustering. + - :mod:`cuml.cluster` + + +Dimensionality Reduction and Manifold Learning +============================================== + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.random_projection.GaussianRandomProjection` + - Reduce dimensionality through Gaussian random projection. + - :mod:`cuml.random_projection` + * - :obj:`~cuml.decomposition.IncrementalPCA` + - Incremental Principal Component Analysis. + - :mod:`cuml.decomposition` + * - :obj:`~cuml.decomposition.PCA` + - Principal Component Analysis. + - :mod:`cuml.decomposition` + * - :obj:`~cuml.random_projection.SparseRandomProjection` + - Reduce dimensionality through sparse random projection. + - :mod:`cuml.random_projection` + * - :obj:`~cuml.manifold.SpectralEmbedding` + - Spectral Embedding for non-linear dimensionality reduction. + - :mod:`cuml.manifold` + * - :obj:`~cuml.decomposition.TruncatedSVD` + - Dimensionality reduction using truncated SVD. + - :mod:`cuml.decomposition` + * - :obj:`~cuml.manifold.TSNE` + - t-Distributed Stochastic Neighbor Embedding. + - :mod:`cuml.manifold` + * - :obj:`~cuml.manifold.UMAP` + - Uniform Manifold Approximation and Projection. + - :mod:`cuml.manifold` + + +Covariance Estimation +===================== + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.covariance.LedoitWolf` + - Ledoit-Wolf shrinkage covariance estimator. + - :mod:`cuml.covariance` + + +Neighbors +========= + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.neighbors.KernelDensity` + - Kernel Density Estimation. + - :mod:`cuml.neighbors` + * - :obj:`~cuml.neighbors.KNeighborsClassifier` + - K-Nearest Neighbors classifier. + - :mod:`cuml.neighbors` + * - :obj:`~cuml.neighbors.KNeighborsRegressor` + - K-Nearest Neighbors regressor. + - :mod:`cuml.neighbors` + * - :obj:`~cuml.neighbors.NearestNeighbors` + - Unsupervised nearest neighbors. + - :mod:`cuml.neighbors` + + +Time Series +=========== + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.tsa.ARIMA` + - ARIMA time series model. + - :mod:`cuml.tsa` + * - :obj:`~cuml.tsa.auto_arima.AutoARIMA` + - Automatic ARIMA model selection. + - :mod:`cuml.tsa` + * - :obj:`~cuml.tsa.ExponentialSmoothing` + - Holt-Winters Exponential Smoothing. + - :mod:`cuml.tsa` + + +Model Explainability +==================== + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.explainer.KernelExplainer` + - SHAP Kernel Explainer. + - :mod:`cuml.explainer` + * - :obj:`~cuml.explainer.PermutationExplainer` + - SHAP Permutation Explainer. + - :mod:`cuml.explainer` + + +Multi-Node, Multi-GPU Algorithms +================================ + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.dask.solvers.CD` + - Multi-GPU Coordinate Descent solver. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.cluster.DBSCAN` + - Multi-GPU DBSCAN clustering. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.linear_model.ElasticNet` + - Multi-GPU ElasticNet regression. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.cluster.KMeans` + - Multi-GPU K-Means clustering. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.neighbors.KNeighborsClassifier` + - Multi-GPU K-Nearest Neighbors classifier. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.neighbors.KNeighborsRegressor` + - Multi-GPU K-Nearest Neighbors regressor. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.linear_model.Lasso` + - Multi-GPU Lasso regression. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.linear_model.LinearRegression` + - Multi-GPU Linear Regression. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.naive_bayes.MultinomialNB` + - Multi-GPU Multinomial Naive Bayes. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.neighbors.NearestNeighbors` + - Multi-GPU Nearest Neighbors. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.decomposition.PCA` + - Multi-GPU Principal Component Analysis. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.ensemble.RandomForestClassifier` + - Multi-GPU Random Forest classifier. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.ensemble.RandomForestRegressor` + - Multi-GPU Random Forest regressor. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.linear_model.Ridge` + - Multi-GPU Ridge Regression. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.decomposition.TruncatedSVD` + - Multi-GPU Truncated SVD. + - :mod:`cuml.dask` + * - :obj:`~cuml.dask.manifold.UMAP` + - Multi-GPU UMAP. + - :mod:`cuml.dask` + + +cuml.accel +========== + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.accel.enabled` + - Check if cuML acceleration is enabled. + - :mod:`cuml.accel` + * - :obj:`~cuml.accel.install` + - Install cuML acceleration hooks. + - :mod:`cuml.accel` + * - :obj:`~cuml.accel.is_proxy` + - Check if an object is a cuML proxy. + - :mod:`cuml.accel` + * - :obj:`~cuml.accel.profile` + - Profile cuML acceleration. + - :mod:`cuml.accel` + + +Experimental +============ + +.. list-table:: + :header-rows: 1 + :widths: 30 50 20 + + * - Object + - Description + - Module + * - :obj:`~cuml.explainer.TreeExplainer` + - SHAP Tree Explainer. + - :mod:`cuml.explainer` diff --git a/docs/source/conf.py b/docs/source/conf.py index 6fdeaa4fcb..44d6ca172b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-FileCopyrightText: Copyright (c) 2018-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 # # This file is execfile()d with the current directory set to its @@ -62,7 +62,7 @@ templates_path = ["_templates"] # generate autosummary even if no references -# autosummary_generate = True +autosummary_generate = True # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: @@ -267,3 +267,13 @@ def setup(app): # backticks`) to be a python object. See # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-default_role default_role = "py:obj" + +# rst_prolog is prepended to every RST file. We define the :py: role here so +# that docstrings using :py:`code` for inline Python-highlighted code render +# correctly on all pages. This role was previously defined only in the old +# monolithic api.rst. +rst_prolog = """ +.. role:: py(code) + :language: python + :class: highlight +""" diff --git a/docs/source/index.rst b/docs/source/index.rst index 26c0d0aee9..1ba8031c93 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -68,7 +68,7 @@ Community & Support =================== * :doc:`User Guide ` - Comprehensive usage documentation -* :doc:`API Reference ` - Complete API documentation +* :doc:`API Reference ` - Complete API documentation * `GitHub Issues `_ - Report bugs and request features * `RAPIDS Community `_ - Join our community @@ -78,6 +78,6 @@ Community & Support cuml_intro.rst user_guide.rst cuml-accel/index.rst - api.rst + api/index FIL.rst cuml_blogs.rst diff --git a/docs/source/sphinxext/github_link.py b/docs/source/sphinxext/github_link.py index 41c6328b30..4a9b9d2c24 100644 --- a/docs/source/sphinxext/github_link.py +++ b/docs/source/sphinxext/github_link.py @@ -1,7 +1,7 @@ # This contains code with copyright by the scikit-learn project, subject to the # license in /thirdparty/LICENSES/LICENSE.scikit_learn # -# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause # @@ -90,6 +90,8 @@ def _linkcode_resolve(domain, info, package, url_fmt, revision): if not fn: # Possibly Cython code. Search docstring for source + if obj.__doc__ is None: + return m = source_regex.search(obj.__doc__) if m is not None: diff --git a/python/cuml/cuml/__init__.py b/python/cuml/cuml/__init__.py index bb035d5950..550c2e3c1f 100644 --- a/python/cuml/cuml/__init__.py +++ b/python/cuml/cuml/__init__.py @@ -59,7 +59,7 @@ from cuml.neighbors.kneighbors_classifier import KNeighborsClassifier from cuml.neighbors.kneighbors_regressor import KNeighborsRegressor from cuml.neighbors.nearest_neighbors import NearestNeighbors -from cuml.preprocessing.LabelEncoder import LabelEncoder +from cuml.preprocessing._label import LabelEncoder from cuml.random_projection.random_projection import ( GaussianRandomProjection, SparseRandomProjection, diff --git a/python/cuml/cuml/common/doc_utils.py b/python/cuml/cuml/common/doc_utils.py index 82901705a1..66be889bc3 100644 --- a/python/cuml/cuml/common/doc_utils.py +++ b/python/cuml/cuml/common/doc_utils.py @@ -1,5 +1,5 @@ # -# SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 # @@ -101,10 +101,10 @@ _return_values_docstrings = { "dense": "{name} : cuDF, CuPy or NumPy object depending on cuML's output type configuration, shape = {shape}\n" # noqa " {description}\n\n For more information on how to configure cuML's output type,\n" # noqa - " refer to: `Output Data Type Configuration`_.", # noqa + " refer to: :ref:`output-data-type-configuration`.", # noqa "dense_sparse": "{name} : cuDF, CuPy or NumPy object depending on cuML's output type configuration, cupyx.scipy.sparse for sparse output, shape = {shape}\n" # noqa " {description}\n\n For more information on how to configure cuML's dense output type,\n" # noqa - " refer to: `Output Data Type Configuration`_.", # noqa + " refer to: :ref:`output-data-type-configuration`.", # noqa "dense_datatype": "cuDF, CuPy or NumPy object depending on cuML's output type" "configuration, shape ={shape}", "dense_sparse_datatype": "cuDF, CuPy or NumPy object depending on cuML's output type" diff --git a/python/cuml/cuml/dask/preprocessing/__init__.py b/python/cuml/cuml/dask/preprocessing/__init__.py index 798552a7fb..1b58cf651f 100644 --- a/python/cuml/cuml/dask/preprocessing/__init__.py +++ b/python/cuml/cuml/dask/preprocessing/__init__.py @@ -1,7 +1,7 @@ -# SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 # +from cuml.dask.preprocessing._label import LabelEncoder from cuml.dask.preprocessing.encoders import OneHotEncoder, OrdinalEncoder from cuml.dask.preprocessing.label import LabelBinarizer -from cuml.dask.preprocessing.LabelEncoder import LabelEncoder diff --git a/python/cuml/cuml/dask/preprocessing/LabelEncoder.py b/python/cuml/cuml/dask/preprocessing/_label.py similarity index 98% rename from python/cuml/cuml/dask/preprocessing/LabelEncoder.py rename to python/cuml/cuml/dask/preprocessing/_label.py index d67fb46d58..852bbad733 100644 --- a/python/cuml/cuml/dask/preprocessing/LabelEncoder.py +++ b/python/cuml/cuml/dask/preprocessing/_label.py @@ -54,7 +54,7 @@ class LabelEncoder( >>> # There are two functionally equivalent ways to do this >>> le = LabelEncoder() >>> le.fit(ddf.cat_col) # le = le.fit(data.category) also works - + >>> encoded = le.transform(ddf.cat_col) >>> print(encoded.compute()) 0 0 diff --git a/python/cuml/cuml/preprocessing/__init__.py b/python/cuml/cuml/preprocessing/__init__.py index 141f465c3e..f9e98114f2 100644 --- a/python/cuml/cuml/preprocessing/__init__.py +++ b/python/cuml/cuml/preprocessing/__init__.py @@ -1,5 +1,5 @@ # -# SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 # from cuml._thirdparty.sklearn.preprocessing import ( @@ -29,10 +29,10 @@ ) from cuml.model_selection import train_test_split from cuml.preprocessing import text +from cuml.preprocessing._label import LabelEncoder +from cuml.preprocessing._target_encoder import TargetEncoder from cuml.preprocessing.encoders import OneHotEncoder, OrdinalEncoder from cuml.preprocessing.label import LabelBinarizer, label_binarize -from cuml.preprocessing.LabelEncoder import LabelEncoder -from cuml.preprocessing.TargetEncoder import TargetEncoder __all__ = [ # Classes diff --git a/python/cuml/cuml/preprocessing/LabelEncoder.py b/python/cuml/cuml/preprocessing/_label.py similarity index 100% rename from python/cuml/cuml/preprocessing/LabelEncoder.py rename to python/cuml/cuml/preprocessing/_label.py diff --git a/python/cuml/cuml/preprocessing/TargetEncoder.py b/python/cuml/cuml/preprocessing/_target_encoder.py similarity index 100% rename from python/cuml/cuml/preprocessing/TargetEncoder.py rename to python/cuml/cuml/preprocessing/_target_encoder.py diff --git a/python/cuml/cuml/preprocessing/encoders.py b/python/cuml/cuml/preprocessing/encoders.py index 870dd60397..3d898fcca8 100644 --- a/python/cuml/cuml/preprocessing/encoders.py +++ b/python/cuml/cuml/preprocessing/encoders.py @@ -15,7 +15,7 @@ from cuml.internals.base import Base from cuml.internals.output_utils import cudf_to_pandas from cuml.internals.validation import check_features, check_is_fitted -from cuml.preprocessing.LabelEncoder import LabelEncoder +from cuml.preprocessing._label import LabelEncoder class BaseEncoder(Base): diff --git a/python/cuml/tests/dask/test_dask_label_encoder.py b/python/cuml/tests/dask/test_dask_label_encoder.py index 0877430c2c..606d32274a 100644 --- a/python/cuml/tests/dask/test_dask_label_encoder.py +++ b/python/cuml/tests/dask/test_dask_label_encoder.py @@ -9,7 +9,7 @@ from sklearn.utils.validation import check_is_fitted import cuml -from cuml.dask.preprocessing.LabelEncoder import LabelEncoder +from cuml.dask.preprocessing._label import LabelEncoder def _arr_to_similarity_mat(arr): diff --git a/python/cuml/tests/test_label_encoder.py b/python/cuml/tests/test_label_encoder.py index 36c6e6cbfa..8ccfebfea1 100644 --- a/python/cuml/tests/test_label_encoder.py +++ b/python/cuml/tests/test_label_encoder.py @@ -9,7 +9,7 @@ from sklearn.exceptions import NotFittedError from sklearn.utils.validation import check_is_fitted -from cuml.preprocessing.LabelEncoder import LabelEncoder +from cuml.preprocessing._label import LabelEncoder def _df_to_similarity_mat(df): diff --git a/python/cuml/tests/test_target_encoder.py b/python/cuml/tests/test_target_encoder.py index c9a1694c07..9ff0b0787f 100644 --- a/python/cuml/tests/test_target_encoder.py +++ b/python/cuml/tests/test_target_encoder.py @@ -7,7 +7,7 @@ import pandas import pytest -from cuml.preprocessing.TargetEncoder import TargetEncoder +from cuml.preprocessing._target_encoder import TargetEncoder from cuml.testing.utils import array_equal # Filter the combination mode deprecation warning for all tests in this module