scikit-learn-intelex 2025.10.0__py313-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/__init__.py +73 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/__main__.py +58 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/_daal4py.cp313-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/mb/__init__.py +94 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/mb/gbt_convertors.py +1199 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/mb/logistic_regression_builders.py +211 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/mb/tree_based_builders.py +425 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/mpi_transceiver.cp313-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/__init__.py +40 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/_n_jobs_support.py +252 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/_utils.py +245 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/dbscan.py +165 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/k_means.py +565 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/tests/test_dbscan.py +109 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/decomposition/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/decomposition/_pca.py +528 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/AdaBoostClassifier.py +192 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/GBTDAAL.py +333 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/__init__.py +27 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/_forest.py +1285 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/tests/test_decision_forest.py +206 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/__init__.py +29 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/_coordinate_descent.py +826 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/_linear.py +269 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/_ridge.py +290 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/coordinate_descent.py +17 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/linear.py +17 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/logistic_loss.py +195 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/logistic_path.py +561 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/ridge.py +17 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/tests/test_enet.py +157 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/tests/test_linear.py +198 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/tests/test_ridge.py +69 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/manifold/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/manifold/_t_sne.py +432 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/metrics/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/metrics/_pairwise.py +259 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/metrics/_ranking.py +210 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/model_selection/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/model_selection/_split.py +309 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/model_selection/tests/test_split.py +56 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/__init__.py +0 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/dispatcher.py +232 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/_models_info.py +164 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/test_monkeypatch.py +71 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/test_patching.py +90 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/utils/_launch_algorithms.py +117 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/__init__.py +21 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_base.py +493 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_classification.py +136 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_regression.py +72 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_unsupervised.py +55 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/tests/test_kneighbors.py +113 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/svm/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/svm/svm.py +736 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/utils/__init__.py +21 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/utils/base.py +80 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/utils/tests/test_utils.py +51 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/daal4py/sklearn/utils/validation.py +772 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/__init__.py +151 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/_config.py +80 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/_device_offload.py +199 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/_onedal_py_dpc.cp313-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/_onedal_py_host.cp313-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/basic_statistics/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/basic_statistics/basic_statistics.py +151 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/basic_statistics/incremental_basic_statistics.py +165 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/basic_statistics/tests/test_basic_statistics.py +241 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/basic_statistics/tests/test_incremental_basic_statistics.py +279 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/basic_statistics/tests/utils.py +50 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/__init__.py +27 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/dbscan.py +80 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/kmeans.py +582 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/kmeans_init.py +145 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/tests/test_dbscan.py +125 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/tests/test_kmeans.py +88 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/cluster/tests/test_kmeans_init.py +93 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/common/_backend.py +258 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/common/_estimator_checks.py +47 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/common/_mixin.py +62 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/common/hyperparameters.py +148 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/common/tests/test_sycl.py +148 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/covariance/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/covariance/covariance.py +121 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/covariance/incremental_covariance.py +151 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/covariance/tests/test_covariance.py +50 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/covariance/tests/test_incremental_covariance.py +190 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/datatypes/__init__.py +29 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/datatypes/_data_conversion.py +158 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/datatypes/_dlpack.py +64 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/datatypes/_sycl_usm.py +63 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/datatypes/tests/common.py +131 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/datatypes/tests/test_data.py +686 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/decomposition/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/decomposition/incremental_pca.py +218 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/decomposition/pca.py +124 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/decomposition/tests/test_incremental_pca.py +291 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/dummy/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/dummy/dummy.py +137 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/ensemble/__init__.py +29 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/ensemble/forest.py +781 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/ensemble/tests/test_random_forest.py +97 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/__init__.py +27 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/incremental_linear_model.py +201 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/linear_model.py +230 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/logistic_regression.py +293 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_incremental_linear_regression.py +213 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_incremental_ridge_regression.py +171 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_linear_regression.py +252 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_logistic_regression.py +95 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_ridge.py +95 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/neighbors/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/neighbors/neighbors.py +690 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/neighbors/tests/test_knn_classification.py +49 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/primitives/__init__.py +27 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/primitives/get_tree.py +27 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/primitives/kernel_functions.py +202 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/primitives/tests/test_kernel_functions.py +159 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/svm.py +592 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/tests/test_csr_svm.py +352 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/tests/test_nusvc.py +204 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/tests/test_nusvr.py +210 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/tests/test_svc.py +168 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/svm/tests/test_svr.py +243 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/tests/test_common.py +71 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/tests/utils/_dataframes_support.py +179 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/tests/utils/_device_selection.py +94 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/utils/_array_api.py +98 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/utils/_sycl_queue_manager.py +213 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/utils/_third_party.py +220 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/utils/tests/test_validation.py +142 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/onedal/utils/validation.py +503 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/__init__.py +69 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/__main__.py +58 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/_config.py +163 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/_device_offload.py +205 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/_utils.py +219 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/base.py +109 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/basic_statistics/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/basic_statistics/basic_statistics.py +241 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/basic_statistics/incremental_basic_statistics.py +338 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/basic_statistics/tests/test_basic_statistics.py +405 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/basic_statistics/tests/test_incremental_basic_statistics.py +455 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/dbscan.py +199 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/k_means.py +399 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/tests/test_dbscan.py +38 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/tests/test_kmeans.py +157 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/conftest.py +82 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/covariance/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/covariance/incremental_covariance.py +440 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/covariance/tests/test_incremental_covariance.py +307 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/decomposition/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/decomposition/pca.py +558 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/decomposition/tests/test_pca.py +164 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/dispatcher.py +572 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/doc/third-party-programs.txt +629 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/dummy/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/dummy/_dummy.py +615 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/dummy/tests/test_dummy.py +62 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/ensemble/__init__.py +29 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/ensemble/_forest.py +1799 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/ensemble/tests/test_forest.py +196 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/glob/__main__.py +72 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/glob/dispatcher.py +101 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/__init__.py +32 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/coordinate_descent.py +44 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/incremental_linear.py +427 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/incremental_ridge.py +407 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/linear.py +363 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/logistic_regression.py +466 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/ridge.py +407 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_incremental_linear.py +267 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_incremental_ridge.py +214 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_linear.py +167 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_logreg.py +565 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_ridge.py +256 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/manifold/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/manifold/t_sne.py +28 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/manifold/tests/test_tsne.py +256 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/metrics/__init__.py +23 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/metrics/pairwise.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/metrics/ranking.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/metrics/tests/test_metrics.py +39 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/model_selection/__init__.py +21 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/model_selection/split.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/model_selection/tests/test_model_selection.py +34 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/__init__.py +27 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/_lof.py +189 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/common.py +313 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/knn_classification.py +189 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/knn_regression.py +167 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/knn_unsupervised.py +170 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/neighbors/tests/test_neighbors.py +82 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/__init__.py +17 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/covariance/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/covariance/covariance.py +261 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/covariance/tests/test_covariance.py +112 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/decomposition/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/decomposition/incremental_pca.py +406 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/preview/decomposition/tests/test_incremental_pca.py +390 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/__init__.py +25 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/basic_statistics.py +24 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/incremental_basic_statistics.py +30 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py +117 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/tests/test_incremental_basic_statistics_spmd.py +314 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/cluster/__init__.py +30 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/cluster/dbscan.py +26 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/cluster/kmeans.py +21 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/cluster/tests/test_dbscan_spmd.py +108 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/cluster/tests/test_kmeans_spmd.py +180 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/covariance.py +24 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/incremental_covariance.py +29 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/tests/test_covariance_spmd.py +120 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/tests/test_incremental_covariance_spmd.py +200 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/__init__.py +20 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/incremental_pca.py +23 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/pca.py +23 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/tests/test_incremental_pca_spmd.py +276 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/tests/test_pca_spmd.py +146 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/ensemble/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/ensemble/forest.py +299 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/ensemble/tests/test_forest_spmd.py +299 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/__init__.py +21 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/incremental_linear_model.py +28 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/linear_model.py +24 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/logistic_regression.py +21 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/tests/test_incremental_linear_spmd.py +345 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py +162 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/tests/test_logistic_regression_spmd.py +169 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/neighbors/__init__.py +23 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py +433 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/__init__.py +29 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/_common.py +403 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/nusvc.py +278 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/nusvr.py +158 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/svc.py +306 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/svr.py +155 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/svm/tests/test_svm.py +124 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_common.py +607 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_config.py +256 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_hyperparameters.py +111 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_memory_usage.py +335 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_monkeypatch.py +269 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_n_jobs_support.py +111 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_parallel.py +48 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_patching.py +418 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/test_run_to_run_stability.py +335 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/utils/__init__.py +48 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/utils/base.py +420 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/tests/utils/spmd.py +198 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/__init__.py +19 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/_array_api.py +217 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/class_weight.py +100 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/parallel.py +97 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/tests/test_class_weight.py +69 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/tests/test_validation.py +238 -0
- scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/utils/validation.py +212 -0
- scikit_learn_intelex-2025.10.0.dist-info/LICENSE.txt +202 -0
- scikit_learn_intelex-2025.10.0.dist-info/METADATA +182 -0
- scikit_learn_intelex-2025.10.0.dist-info/RECORD +267 -0
- scikit_learn_intelex-2025.10.0.dist-info/WHEEL +5 -0
- scikit_learn_intelex-2025.10.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Copyright contributors to the oneDAL project
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
import re
|
|
15
|
+
import sys
|
|
16
|
+
|
|
17
|
+
import numpy as np
|
|
18
|
+
|
|
19
|
+
from .. import (
|
|
20
|
+
classifier_prediction_result,
|
|
21
|
+
logistic_regression_model_builder,
|
|
22
|
+
logistic_regression_prediction,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
_docstring_X = """Parameters
|
|
26
|
+
----------
|
|
27
|
+
X : array-like(n_samples, n_features)
|
|
28
|
+
The features / covariates for each row. Can be passed as either a NumPy array
|
|
29
|
+
or as a sparse CSR array/matrix from SciPy. For faster results, use the same
|
|
30
|
+
dtype as what this object was built for."""
|
|
31
|
+
if (sys.version_info.major == 3) and (sys.version_info.minor <= 12):
|
|
32
|
+
_docstring_X = re.sub("^", " " * 8, _docstring_X, flags=re.MULTILINE).strip()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class LogisticDAALModel:
|
|
36
|
+
"""
|
|
37
|
+
Logistic Regression Predictor
|
|
38
|
+
|
|
39
|
+
Creates a logistic regression or multionomial logistic regression model object
|
|
40
|
+
which can calculate fast predictions of different types (classes, probabilities,
|
|
41
|
+
logarithms of probabilities), from fitted coefficients and intercepts obtained
|
|
42
|
+
elsewhere (such as from :obj:`sklearn.linear_model.LogisticRegression`), making
|
|
43
|
+
the predictions either in double (``np.float64``) or single (``np.float32``)
|
|
44
|
+
precision.
|
|
45
|
+
|
|
46
|
+
See Also
|
|
47
|
+
--------
|
|
48
|
+
:obj:`sklearn.linear_model.LogisticRegression`, :obj:`sklearn.linear_model.SGDClassifier`,
|
|
49
|
+
:obj:`daal4py.classifier_prediction_result`.
|
|
50
|
+
|
|
51
|
+
Parameters
|
|
52
|
+
----------
|
|
53
|
+
coefs : array(n_classes, n_features) or array(n_features,)
|
|
54
|
+
The fitted model coefficients. Note that only dense arrays are supported.
|
|
55
|
+
In the case of binary classification, can be passed as a 1D array or as a
|
|
56
|
+
2D array having a single row.
|
|
57
|
+
intercepts: array(n_classes) or float
|
|
58
|
+
The fitted intercepts. In the case of binary classification, must be passed
|
|
59
|
+
as either a scalar, or as a 1D array with a single entry.
|
|
60
|
+
dtype : np.float32 or np.float64
|
|
61
|
+
The dtype to use for the object.
|
|
62
|
+
|
|
63
|
+
Attributes
|
|
64
|
+
----------
|
|
65
|
+
n_classes_ : int
|
|
66
|
+
Number of classes in the model.
|
|
67
|
+
n_features_in_ : int
|
|
68
|
+
Number of features in the model.
|
|
69
|
+
dtype_ : np.dtype
|
|
70
|
+
The dtype of the model
|
|
71
|
+
coef_ : array(n_classes, n_features)
|
|
72
|
+
The model coefficients
|
|
73
|
+
intercept_ : array(n_classes)
|
|
74
|
+
The model intercepts
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
def __init__(self, coefs, intercepts, dtype=np.float64):
|
|
78
|
+
assert dtype in [np.float32, np.float64]
|
|
79
|
+
coefs = np.require(coefs, requirements=["ENSUREARRAY"])
|
|
80
|
+
if len(coefs.shape) == 1:
|
|
81
|
+
coefs = coefs.reshape((1, -1))
|
|
82
|
+
self.n_features_in_ = coefs.shape[1]
|
|
83
|
+
self.n_classes_ = max(2, coefs.shape[0])
|
|
84
|
+
intercepts = np.require(intercepts, requirements=["ENSUREARRAY"]).reshape(-1)
|
|
85
|
+
if self.n_classes_ == 2:
|
|
86
|
+
assert len(intercepts) == 1
|
|
87
|
+
else:
|
|
88
|
+
assert intercepts.shape[0] == coefs.shape[0]
|
|
89
|
+
self._fptype = "float" if dtype == np.float32 else "double"
|
|
90
|
+
self.dtype_ = dtype
|
|
91
|
+
if coefs.dtype != self.dtype_:
|
|
92
|
+
coefs = coefs.astype(self.dtype_)
|
|
93
|
+
if intercepts.dtype != self.dtype_:
|
|
94
|
+
intercepts = intercepts.astype(self.dtype_)
|
|
95
|
+
builder = logistic_regression_model_builder(
|
|
96
|
+
n_classes=self.n_classes_, n_features=coefs.shape[1]
|
|
97
|
+
)
|
|
98
|
+
builder.set_beta(coefs, intercepts)
|
|
99
|
+
self._model = builder.model
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def coef_(self):
|
|
103
|
+
return self._model.Beta[:, 1:]
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def intercept_(self):
|
|
107
|
+
return self._model.Beta[:, 0]
|
|
108
|
+
|
|
109
|
+
def _logistic_regression_prediction(
|
|
110
|
+
self, X: np.ndarray, resultsToEvaluate: str
|
|
111
|
+
) -> classifier_prediction_result:
|
|
112
|
+
return logistic_regression_prediction(
|
|
113
|
+
nClasses=self.n_classes_,
|
|
114
|
+
fptype=self._fptype,
|
|
115
|
+
resultsToEvaluate=resultsToEvaluate,
|
|
116
|
+
).compute(X, self._model)
|
|
117
|
+
|
|
118
|
+
def predict(self, X) -> np.ndarray:
|
|
119
|
+
"""
|
|
120
|
+
Predict most probable class
|
|
121
|
+
|
|
122
|
+
%docstring_X%
|
|
123
|
+
|
|
124
|
+
Returns
|
|
125
|
+
-------
|
|
126
|
+
classes : array(n_samples,)
|
|
127
|
+
The most probable class, as integer indexes
|
|
128
|
+
"""
|
|
129
|
+
return (
|
|
130
|
+
self._logistic_regression_prediction(X, "computeClassLabels")
|
|
131
|
+
.prediction.reshape(-1)
|
|
132
|
+
.astype(int)
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
predict.__doc__ = predict.__doc__.replace(r"%docstring_X%", _docstring_X)
|
|
136
|
+
|
|
137
|
+
def predict_proba(self, X) -> np.ndarray:
|
|
138
|
+
"""
|
|
139
|
+
Predict probabilities of belonging to each class
|
|
140
|
+
|
|
141
|
+
%docstring_X%
|
|
142
|
+
|
|
143
|
+
Returns
|
|
144
|
+
-------
|
|
145
|
+
proba : array(n_samples, n_classes)
|
|
146
|
+
The predicted probabilities for each class.
|
|
147
|
+
"""
|
|
148
|
+
return self._logistic_regression_prediction(
|
|
149
|
+
X, "computeClassProbabilities"
|
|
150
|
+
).probabilities
|
|
151
|
+
|
|
152
|
+
predict_proba.__doc__ = predict_proba.__doc__.replace(r"%docstring_X%", _docstring_X)
|
|
153
|
+
|
|
154
|
+
def predict_log_proba(self, X) -> np.ndarray:
|
|
155
|
+
"""
|
|
156
|
+
Predict log-probabilities of belonging to each class
|
|
157
|
+
|
|
158
|
+
%docstring_X%
|
|
159
|
+
|
|
160
|
+
Returns
|
|
161
|
+
-------
|
|
162
|
+
log_proba : array(n_samples, n_classes)
|
|
163
|
+
The logarithms of the predicted probabilities for each class.
|
|
164
|
+
"""
|
|
165
|
+
return self._logistic_regression_prediction(
|
|
166
|
+
X, "computeClassLogProbabilities"
|
|
167
|
+
).logProbabilities
|
|
168
|
+
|
|
169
|
+
predict_log_proba.__doc__ = predict_log_proba.__doc__.replace(
|
|
170
|
+
r"%docstring_X%", _docstring_X
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
def predict_multiple(
|
|
174
|
+
self, X, classes: bool = True, proba: bool = True, log_proba: bool = True
|
|
175
|
+
) -> classifier_prediction_result:
|
|
176
|
+
"""
|
|
177
|
+
Make multiple prediction types at once
|
|
178
|
+
|
|
179
|
+
A method that can output the results from ``predict``, ``predict_proba``, and ``predict_log_proba``
|
|
180
|
+
all together in the same call more efficiently than computing them independently.
|
|
181
|
+
|
|
182
|
+
%docstring_X%
|
|
183
|
+
classes : bool
|
|
184
|
+
Whether to output class predictions (what is obtained from :meth:`predict`).
|
|
185
|
+
proba : bool
|
|
186
|
+
Whether to output per-class probability predictions (what is obtained from
|
|
187
|
+
:meth:`predict_proba`).
|
|
188
|
+
log_proba : bool
|
|
189
|
+
Whether to output per-class logarithms of probabilities (what is obtained
|
|
190
|
+
from :meth:`predict_log_proba`).
|
|
191
|
+
|
|
192
|
+
Returns
|
|
193
|
+
-------
|
|
194
|
+
predictions : classifier_prediction_result
|
|
195
|
+
An object of class :obj:`daal4py.classifier_prediction_result` with the requested
|
|
196
|
+
prediction types for the same ``X`` data.
|
|
197
|
+
"""
|
|
198
|
+
pred_request = "|".join(
|
|
199
|
+
(["computeClassLabels"] if classes else [])
|
|
200
|
+
+ (["computeClassProbabilities"] if proba else [])
|
|
201
|
+
+ (["computeClassLogProbabilities"] if log_proba else [])
|
|
202
|
+
)
|
|
203
|
+
if not len(pred_request):
|
|
204
|
+
raise ValueError(
|
|
205
|
+
"Must request at least one of 'classes', 'proba', 'log_proba'."
|
|
206
|
+
)
|
|
207
|
+
return self._logistic_regression_prediction(X, pred_request)
|
|
208
|
+
|
|
209
|
+
predict_multiple.__doc__ = predict_multiple.__doc__.replace(
|
|
210
|
+
r"%docstring_X%", _docstring_X
|
|
211
|
+
)
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Copyright 2023 Intel Corporation
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
# ==============================================================================
|
|
16
|
+
|
|
17
|
+
# daal4py Model builders API
|
|
18
|
+
|
|
19
|
+
import warnings
|
|
20
|
+
from typing import Literal, Optional
|
|
21
|
+
|
|
22
|
+
import numpy as np
|
|
23
|
+
|
|
24
|
+
import daal4py as d4p
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
from pandas import DataFrame
|
|
28
|
+
from pandas.core.dtypes.cast import find_common_type
|
|
29
|
+
|
|
30
|
+
pandas_is_imported = True
|
|
31
|
+
except (ImportError, ModuleNotFoundError):
|
|
32
|
+
pandas_is_imported = False
|
|
33
|
+
|
|
34
|
+
from sklearn.utils.metaestimators import available_if
|
|
35
|
+
|
|
36
|
+
from .gbt_convertors import (
|
|
37
|
+
get_catboost_params,
|
|
38
|
+
get_gbt_model_from_catboost,
|
|
39
|
+
get_gbt_model_from_lightgbm,
|
|
40
|
+
get_gbt_model_from_treelite,
|
|
41
|
+
get_gbt_model_from_xgboost,
|
|
42
|
+
get_lightgbm_params,
|
|
43
|
+
get_xgboost_params,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def parse_dtype(dt):
|
|
48
|
+
if dt == np.double:
|
|
49
|
+
return "double"
|
|
50
|
+
if dt == np.single:
|
|
51
|
+
return "float"
|
|
52
|
+
raise ValueError(f"Input array has unexpected dtype = {dt}")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def getFPType(X):
|
|
56
|
+
if pandas_is_imported:
|
|
57
|
+
if isinstance(X, DataFrame):
|
|
58
|
+
dt = find_common_type(X.dtypes.tolist())
|
|
59
|
+
return parse_dtype(dt)
|
|
60
|
+
|
|
61
|
+
dt = getattr(X, "dtype", None)
|
|
62
|
+
return parse_dtype(dt)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class GBTDAALBaseModel:
|
|
66
|
+
def __init__(self):
|
|
67
|
+
self.model_type: Optional[
|
|
68
|
+
Literal["xgboost", "catboost", "lightgbm", "treelite"]
|
|
69
|
+
] = None
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def _is_regression(self):
|
|
73
|
+
return hasattr(self, "daal_model_") and isinstance(
|
|
74
|
+
self.daal_model_, d4p.gbt_regression_model
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def _get_params_from_lightgbm(self, params):
|
|
78
|
+
self.n_classes_ = params["num_tree_per_iteration"]
|
|
79
|
+
objective_fun = params["objective"]
|
|
80
|
+
if self.n_classes_ <= 2:
|
|
81
|
+
if "binary" in objective_fun: # nClasses == 1
|
|
82
|
+
self.n_classes_ = 2
|
|
83
|
+
|
|
84
|
+
self.n_features_in_ = params["max_feature_idx"] + 1
|
|
85
|
+
|
|
86
|
+
def _get_params_from_xgboost(self, params):
|
|
87
|
+
self.n_classes_ = int(params["learner"]["learner_model_param"]["num_class"])
|
|
88
|
+
objective_fun = params["learner"]["learner_train_param"]["objective"]
|
|
89
|
+
if self.n_classes_ <= 2:
|
|
90
|
+
if objective_fun in ["binary:logistic", "binary:logitraw"]:
|
|
91
|
+
self.n_classes_ = 2
|
|
92
|
+
elif self.n_classes_ == 0:
|
|
93
|
+
self.n_classes_ = 1
|
|
94
|
+
|
|
95
|
+
self.n_features_in_ = int(params["learner"]["learner_model_param"]["num_feature"])
|
|
96
|
+
|
|
97
|
+
def _get_params_from_catboost(self, params):
|
|
98
|
+
if "class_params" in params["model_info"]:
|
|
99
|
+
self.n_classes_ = len(params["model_info"]["class_params"]["class_to_label"])
|
|
100
|
+
else:
|
|
101
|
+
self.n_classes_ = 1
|
|
102
|
+
self.n_features_in_ = len(params["features_info"]["float_features"])
|
|
103
|
+
|
|
104
|
+
def _convert_model_from_lightgbm(self, booster):
|
|
105
|
+
lgbm_params = get_lightgbm_params(booster)
|
|
106
|
+
self.daal_model_ = get_gbt_model_from_lightgbm(booster, lgbm_params)
|
|
107
|
+
self._get_params_from_lightgbm(lgbm_params)
|
|
108
|
+
self.supports_shap_ = self.n_classes_ < 3
|
|
109
|
+
|
|
110
|
+
def _convert_model_from_xgboost(self, booster):
|
|
111
|
+
xgb_params = get_xgboost_params(booster)
|
|
112
|
+
self.daal_model_ = get_gbt_model_from_xgboost(booster, xgb_params)
|
|
113
|
+
self._get_params_from_xgboost(xgb_params)
|
|
114
|
+
self.supports_shap_ = self.n_classes_ < 3
|
|
115
|
+
|
|
116
|
+
def _convert_model_from_catboost(self, booster):
|
|
117
|
+
catboost_params = get_catboost_params(booster)
|
|
118
|
+
self.daal_model_, self.supports_shap_ = get_gbt_model_from_catboost(booster)
|
|
119
|
+
self._get_params_from_catboost(catboost_params)
|
|
120
|
+
|
|
121
|
+
def _convert_model_from_treelite(self, tl_model):
|
|
122
|
+
self.daal_model_, self.n_classes_, self.n_features_in_, self.supports_shap_ = (
|
|
123
|
+
get_gbt_model_from_treelite(tl_model)
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
def _convert_model(self, model):
|
|
127
|
+
(submodule_name, class_name) = (
|
|
128
|
+
model.__class__.__module__,
|
|
129
|
+
model.__class__.__name__,
|
|
130
|
+
)
|
|
131
|
+
self_class_name = self.__class__.__name__
|
|
132
|
+
|
|
133
|
+
# Build GBTDAALClassifier from LightGBM
|
|
134
|
+
if (submodule_name, class_name) == ("lightgbm.sklearn", "LGBMClassifier"):
|
|
135
|
+
self._convert_model_from_lightgbm(model.booster_)
|
|
136
|
+
# Build GBTDAALClassifier from XGBoost
|
|
137
|
+
elif (submodule_name, class_name) == ("xgboost.sklearn", "XGBClassifier"):
|
|
138
|
+
self._convert_model_from_xgboost(model.get_booster())
|
|
139
|
+
# Build GBTDAALClassifier from CatBoost
|
|
140
|
+
elif (submodule_name, class_name) == ("catboost.core", "CatBoostClassifier"):
|
|
141
|
+
self._convert_model_from_catboost(model)
|
|
142
|
+
# Build GBTDAALRegressor from LightGBM
|
|
143
|
+
elif (submodule_name, class_name) == ("lightgbm.sklearn", "LGBMRegressor"):
|
|
144
|
+
self._convert_model_from_lightgbm(model.booster_)
|
|
145
|
+
# Build GBTDAALRegressor from XGBoost
|
|
146
|
+
elif (submodule_name, class_name) == ("xgboost.sklearn", "XGBRegressor"):
|
|
147
|
+
self._convert_model_from_xgboost(model.get_booster())
|
|
148
|
+
# Build GBTDAALRegressor from CatBoost
|
|
149
|
+
elif (submodule_name, class_name) == ("catboost.core", "CatBoostRegressor"):
|
|
150
|
+
self._convert_model_from_catboost(model)
|
|
151
|
+
# Build GBTDAALModel from LightGBM
|
|
152
|
+
elif (submodule_name, class_name) == ("lightgbm.basic", "Booster"):
|
|
153
|
+
self._convert_model_from_lightgbm(model)
|
|
154
|
+
# Build GBTDAALModel from XGBoost
|
|
155
|
+
elif (submodule_name, class_name) == ("xgboost.core", "Booster"):
|
|
156
|
+
self._convert_model_from_xgboost(model)
|
|
157
|
+
# Build GBTDAALModel from CatBoost
|
|
158
|
+
elif (submodule_name, class_name) == ("catboost.core", "CatBoost"):
|
|
159
|
+
self._convert_model_from_catboost(model)
|
|
160
|
+
elif (submodule_name, class_name) == ("treelite.model", "Model"):
|
|
161
|
+
self._convert_model_from_treelite(model)
|
|
162
|
+
elif submodule_name.startswith("sklearn.ensemble"):
|
|
163
|
+
raise TypeError(
|
|
164
|
+
"Cannot convert scikit-learn models. Try converting to treelite "
|
|
165
|
+
"with 'treelite.sklearn.import_model' and then converting the "
|
|
166
|
+
"resulting TreeLite object."
|
|
167
|
+
)
|
|
168
|
+
else:
|
|
169
|
+
raise TypeError(f"Unknown model format {submodule_name}.{class_name}")
|
|
170
|
+
|
|
171
|
+
def _predict_classification(
|
|
172
|
+
self, X, fptype, resultsToEvaluate, pred_contribs=False, pred_interactions=False
|
|
173
|
+
):
|
|
174
|
+
if X.shape[1] != self.n_features_in_:
|
|
175
|
+
raise ValueError("Shape of input is different from what was seen in `fit`")
|
|
176
|
+
|
|
177
|
+
if not hasattr(self, "daal_model_"):
|
|
178
|
+
raise ValueError(
|
|
179
|
+
(
|
|
180
|
+
"The class {} instance does not have 'daal_model_' attribute set. "
|
|
181
|
+
"Call 'fit' with appropriate arguments before using this method."
|
|
182
|
+
).format(type(self).__name__)
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
# Prediction
|
|
186
|
+
try:
|
|
187
|
+
return self._predict_classification_with_results_to_compute(
|
|
188
|
+
X, fptype, resultsToEvaluate, pred_contribs, pred_interactions
|
|
189
|
+
)
|
|
190
|
+
except TypeError as e:
|
|
191
|
+
if "unexpected keyword argument 'resultsToCompute'" in str(e):
|
|
192
|
+
if pred_contribs or pred_interactions:
|
|
193
|
+
# SHAP values requested, but not supported by this version
|
|
194
|
+
raise TypeError(
|
|
195
|
+
f"{'pred_contribs' if pred_contribs else 'pred_interactions'} not supported by this version of daal4py"
|
|
196
|
+
) from e
|
|
197
|
+
else:
|
|
198
|
+
# unknown type error
|
|
199
|
+
raise
|
|
200
|
+
except RuntimeError as e:
|
|
201
|
+
if "Method is not implemented" in str(e):
|
|
202
|
+
if pred_contribs or pred_interactions:
|
|
203
|
+
raise NotImplementedError(
|
|
204
|
+
f"{'pred_contribs' if pred_contribs else 'pred_interactions'} is not implemented for classification models"
|
|
205
|
+
)
|
|
206
|
+
else:
|
|
207
|
+
raise
|
|
208
|
+
|
|
209
|
+
# fallback to calculation without `resultsToCompute`
|
|
210
|
+
predict_algo = d4p.gbt_classification_prediction(
|
|
211
|
+
nClasses=self.n_classes_,
|
|
212
|
+
fptype=fptype,
|
|
213
|
+
resultsToEvaluate=resultsToEvaluate,
|
|
214
|
+
)
|
|
215
|
+
predict_result = predict_algo.compute(X, self.daal_model_)
|
|
216
|
+
|
|
217
|
+
if resultsToEvaluate == "computeClassLabels":
|
|
218
|
+
return predict_result.prediction.ravel().astype(np.int64, copy=False)
|
|
219
|
+
else:
|
|
220
|
+
return predict_result.probabilities
|
|
221
|
+
|
|
222
|
+
def _predict_classification_with_results_to_compute(
|
|
223
|
+
self,
|
|
224
|
+
X,
|
|
225
|
+
fptype,
|
|
226
|
+
resultsToEvaluate,
|
|
227
|
+
pred_contribs=False,
|
|
228
|
+
pred_interactions=False,
|
|
229
|
+
):
|
|
230
|
+
"""Assume daal4py supports the resultsToCompute kwarg"""
|
|
231
|
+
resultsToCompute = ""
|
|
232
|
+
if pred_contribs:
|
|
233
|
+
resultsToCompute = "shapContributions"
|
|
234
|
+
elif pred_interactions:
|
|
235
|
+
resultsToCompute = "shapInteractions"
|
|
236
|
+
|
|
237
|
+
predict_algo = d4p.gbt_classification_prediction(
|
|
238
|
+
nClasses=self.n_classes_,
|
|
239
|
+
fptype=fptype,
|
|
240
|
+
resultsToCompute=resultsToCompute,
|
|
241
|
+
resultsToEvaluate=resultsToEvaluate,
|
|
242
|
+
)
|
|
243
|
+
predict_result = predict_algo.compute(X, self.daal_model_)
|
|
244
|
+
|
|
245
|
+
if pred_contribs:
|
|
246
|
+
return predict_result.prediction.ravel().reshape((-1, X.shape[1] + 1))
|
|
247
|
+
elif pred_interactions:
|
|
248
|
+
return predict_result.prediction.ravel().reshape(
|
|
249
|
+
(-1, X.shape[1] + 1, X.shape[1] + 1)
|
|
250
|
+
)
|
|
251
|
+
elif resultsToEvaluate == "computeClassLabels":
|
|
252
|
+
return predict_result.prediction.ravel().astype(np.int64, copy=False)
|
|
253
|
+
else:
|
|
254
|
+
return predict_result.probabilities
|
|
255
|
+
|
|
256
|
+
def _predict_regression(
|
|
257
|
+
self, X, fptype, pred_contribs=False, pred_interactions=False
|
|
258
|
+
):
|
|
259
|
+
if X.shape[1] != self.n_features_in_:
|
|
260
|
+
raise ValueError("Shape of input is different from what was seen in `fit`")
|
|
261
|
+
|
|
262
|
+
if not hasattr(self, "daal_model_"):
|
|
263
|
+
raise ValueError(
|
|
264
|
+
(
|
|
265
|
+
"The class {} instance does not have 'daal_model_' attribute set. "
|
|
266
|
+
"Call 'fit' with appropriate arguments before using this method."
|
|
267
|
+
).format(type(self).__name__)
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
try:
|
|
271
|
+
return self._predict_regression_with_results_to_compute(
|
|
272
|
+
X, fptype, pred_contribs, pred_interactions
|
|
273
|
+
)
|
|
274
|
+
except TypeError as e:
|
|
275
|
+
if "unexpected keyword argument 'resultsToCompute'" in str(e) and (
|
|
276
|
+
pred_contribs or pred_interactions
|
|
277
|
+
):
|
|
278
|
+
# SHAP values requested, but not supported by this version
|
|
279
|
+
raise TypeError(
|
|
280
|
+
f"{'pred_contribs' if pred_contribs else 'pred_interactions'} not supported by this version of daalp4y"
|
|
281
|
+
) from e
|
|
282
|
+
else:
|
|
283
|
+
# unknown type error
|
|
284
|
+
raise
|
|
285
|
+
|
|
286
|
+
def _predict_regression_with_results_to_compute(
|
|
287
|
+
self, X, fptype, pred_contribs=False, pred_interactions=False
|
|
288
|
+
):
|
|
289
|
+
"""Assume daal4py supports the resultsToCompute kwarg"""
|
|
290
|
+
resultsToCompute = ""
|
|
291
|
+
if pred_contribs:
|
|
292
|
+
resultsToCompute = "shapContributions"
|
|
293
|
+
elif pred_interactions:
|
|
294
|
+
resultsToCompute = "shapInteractions"
|
|
295
|
+
|
|
296
|
+
predict_algo = d4p.gbt_regression_prediction(
|
|
297
|
+
fptype=fptype, resultsToCompute=resultsToCompute
|
|
298
|
+
)
|
|
299
|
+
predict_result = predict_algo.compute(X, self.daal_model_)
|
|
300
|
+
|
|
301
|
+
if pred_contribs:
|
|
302
|
+
return predict_result.prediction.ravel().reshape((-1, X.shape[1] + 1))
|
|
303
|
+
elif pred_interactions:
|
|
304
|
+
return predict_result.prediction.ravel().reshape(
|
|
305
|
+
(-1, X.shape[1] + 1, X.shape[1] + 1)
|
|
306
|
+
)
|
|
307
|
+
else:
|
|
308
|
+
return predict_result.prediction.ravel()
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
class GBTDAALModel(GBTDAALBaseModel):
|
|
312
|
+
"""
|
|
313
|
+
Gradient Boosted Decision Tree Model
|
|
314
|
+
|
|
315
|
+
Model class offering accelerated predictions for gradient-boosted decision
|
|
316
|
+
tree models from other libraries.
|
|
317
|
+
|
|
318
|
+
Objects of this class are meant to be initialized from GBT model objects
|
|
319
|
+
created through other libraries, returning a different class which can calculate
|
|
320
|
+
predictions faster than the original library that created said model.
|
|
321
|
+
|
|
322
|
+
Can be created from model objects that meet all of the following criteria:
|
|
323
|
+
|
|
324
|
+
- Were produced from one of the following libraries: ``xgboost``, ``lightgbm``, ``catboost``,
|
|
325
|
+
or ``treelite`` (with some limitations). It can work with either the base booster classes
|
|
326
|
+
of those libraries or with their scikit-learn-compatible classes.
|
|
327
|
+
- Do not use categorical features.
|
|
328
|
+
- Are for regression or classification (e.g. no ranking). In the case of XGBoost objective
|
|
329
|
+
``binary:logitraw``, it will create a classification model out of it, and in the case of
|
|
330
|
+
objective ``reg:logistic``, will create a regression model.
|
|
331
|
+
- Are not multi-output models. Note that multi-class classification **is** supported.
|
|
332
|
+
- Are not multi-class random forests (multi-class gradient boosters are supported).
|
|
333
|
+
|
|
334
|
+
Note that while models from packages such as scikit-learn are not supported directly,
|
|
335
|
+
they can still be converted to this class by first converting them to TreeLite and
|
|
336
|
+
then converting to :obj:`GBTDAALModel` from that TreeLite model. In such case, note that
|
|
337
|
+
models corresponding to random forest binary classifiers will be treated as regressors
|
|
338
|
+
that predict probabilities.
|
|
339
|
+
|
|
340
|
+
Parameters
|
|
341
|
+
----------
|
|
342
|
+
model : booster object from another library
|
|
343
|
+
The fitted GBT model from which this object will be created. See rest of the documentation
|
|
344
|
+
for supported input types.
|
|
345
|
+
|
|
346
|
+
Attributes
|
|
347
|
+
----------
|
|
348
|
+
is_classifier_ : bool
|
|
349
|
+
Whether this is a classification model.
|
|
350
|
+
is_regressor_ : bool
|
|
351
|
+
Whether this is a regression model.
|
|
352
|
+
supports_shap_ : bool
|
|
353
|
+
Whether the model supports SHAP calculations.
|
|
354
|
+
"""
|
|
355
|
+
|
|
356
|
+
def __init__(self, model):
|
|
357
|
+
self._convert_model(model)
|
|
358
|
+
for type_str in ("xgboost", "lightgbm", "catboost", "treelite"):
|
|
359
|
+
if type_str in str(type(model)):
|
|
360
|
+
self.model_type = type_str
|
|
361
|
+
break
|
|
362
|
+
|
|
363
|
+
def predict(
|
|
364
|
+
self, X, pred_contribs: bool = False, pred_interactions: bool = False
|
|
365
|
+
) -> np.ndarray:
|
|
366
|
+
"""
|
|
367
|
+
Compute model predictions on new data
|
|
368
|
+
|
|
369
|
+
Computes the predicted values of the response variable for new data given the features / covariates
|
|
370
|
+
for each row.
|
|
371
|
+
|
|
372
|
+
In the case of classification models, this will output the most probable class (see
|
|
373
|
+
:meth:`predict_proba` for probability predictions), while in the case of regression
|
|
374
|
+
models, will output values in the link scale (what XGBoost calls 'margin' and LightGBM
|
|
375
|
+
calls 'raw').
|
|
376
|
+
|
|
377
|
+
:param X: The features covariates. Should be an array of shape ``[num_samples, num_features]``.
|
|
378
|
+
:param bool pred_contribs: Whether to predict feature contributions. Result should have shape ``[num_samples, num_features+1]``, with the last column corresponding to the intercept. See :obj:`xgboost.Booster.predict` for more details about this type of computation.
|
|
379
|
+
:param bool pred_interactions: Whether to predict feature interactions. Result should have shape ``[num_samples, num_features+1, num_features+1]``, with the last position across the last two dimensions corresponding to the intercept. See :obj:`xgboost.Booster.predict` for more details about this type of computation.
|
|
380
|
+
|
|
381
|
+
:rtype: np.ndarray
|
|
382
|
+
"""
|
|
383
|
+
if pred_contribs or pred_interactions:
|
|
384
|
+
if not self.supports_shap_:
|
|
385
|
+
raise TypeError("SHAP calculations are not available for this model.")
|
|
386
|
+
if self.model_type == "catboost":
|
|
387
|
+
warnings.warn(
|
|
388
|
+
"SHAP values from models converted from CatBoost do not match "
|
|
389
|
+
"against those of the original library. See "
|
|
390
|
+
"https://github.com/catboost/catboost/issues/2556 for more details."
|
|
391
|
+
)
|
|
392
|
+
fptype = getFPType(X)
|
|
393
|
+
if self._is_regression:
|
|
394
|
+
return self._predict_regression(X, fptype, pred_contribs, pred_interactions)
|
|
395
|
+
else:
|
|
396
|
+
return self._predict_classification(
|
|
397
|
+
X, fptype, "computeClassLabels", pred_contribs, pred_interactions
|
|
398
|
+
)
|
|
399
|
+
|
|
400
|
+
@property
|
|
401
|
+
def is_classifier_(self) -> bool:
|
|
402
|
+
"""Whether this is a classification model"""
|
|
403
|
+
return not self._is_regression
|
|
404
|
+
|
|
405
|
+
@property
|
|
406
|
+
def is_regressor_(self) -> bool:
|
|
407
|
+
"""Whether this is a regression model"""
|
|
408
|
+
return self._is_regression
|
|
409
|
+
|
|
410
|
+
def _check_proba(self):
|
|
411
|
+
return not self._is_regression
|
|
412
|
+
|
|
413
|
+
@available_if(_check_proba)
|
|
414
|
+
def predict_proba(self, X) -> np.ndarray:
|
|
415
|
+
"""
|
|
416
|
+
Predict class probabilities
|
|
417
|
+
|
|
418
|
+
Computes the predicted probabilities of belonging to each class for each row in the
|
|
419
|
+
input data given the features / covariates. Output shape is ``[num_samples, num_classes]``.
|
|
420
|
+
|
|
421
|
+
:param X: The features covariates. Should be an array of shape ``[num_samples, num_features]``.
|
|
422
|
+
:rtype: np.ndarray
|
|
423
|
+
"""
|
|
424
|
+
fptype = getFPType(X)
|
|
425
|
+
return self._predict_classification(X, fptype, "computeClassProbabilities")
|
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Copyright 2014 Intel Corporation
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
# ==============================================================================
|
|
16
|
+
|
|
17
|
+
from .monkeypatch.dispatcher import _get_map_of_algorithms as sklearn_patch_map
|
|
18
|
+
from .monkeypatch.dispatcher import _patch_names as sklearn_patch_names
|
|
19
|
+
from .monkeypatch.dispatcher import disable as unpatch_sklearn
|
|
20
|
+
from .monkeypatch.dispatcher import enable as patch_sklearn
|
|
21
|
+
from .monkeypatch.dispatcher import patch_is_enabled as sklearn_is_patched
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"cluster",
|
|
25
|
+
"decomposition",
|
|
26
|
+
"ensemble",
|
|
27
|
+
"linear_model",
|
|
28
|
+
"manifold",
|
|
29
|
+
"metrics",
|
|
30
|
+
"model_selection",
|
|
31
|
+
"neighbors",
|
|
32
|
+
"patch_sklearn",
|
|
33
|
+
"sklearn_is_patched",
|
|
34
|
+
"sklearn_patch_map",
|
|
35
|
+
"sklearn_patch_names",
|
|
36
|
+
"svm",
|
|
37
|
+
"tree",
|
|
38
|
+
"unpatch_sklearn",
|
|
39
|
+
"utils",
|
|
40
|
+
]
|