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,399 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Copyright 2021 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
|
+
import logging
|
|
18
|
+
|
|
19
|
+
from daal4py.sklearn._utils import daal_check_version
|
|
20
|
+
|
|
21
|
+
if daal_check_version((2023, "P", 200)):
|
|
22
|
+
|
|
23
|
+
import numbers
|
|
24
|
+
import warnings
|
|
25
|
+
|
|
26
|
+
import numpy as np
|
|
27
|
+
from scipy.sparse import issparse
|
|
28
|
+
from sklearn.cluster import KMeans as _sklearn_KMeans
|
|
29
|
+
from sklearn.utils._openmp_helpers import _openmp_effective_n_threads
|
|
30
|
+
from sklearn.utils.validation import (
|
|
31
|
+
_check_sample_weight,
|
|
32
|
+
_num_samples,
|
|
33
|
+
check_is_fitted,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
from daal4py.sklearn._n_jobs_support import control_n_jobs
|
|
37
|
+
from daal4py.sklearn._utils import sklearn_check_version
|
|
38
|
+
from onedal._device_offload import support_input_format
|
|
39
|
+
from onedal.cluster import KMeans as onedal_KMeans
|
|
40
|
+
from onedal.utils.validation import _is_csr
|
|
41
|
+
|
|
42
|
+
from .._device_offload import dispatch, wrap_output_data
|
|
43
|
+
from .._utils import PatchingConditionsChain
|
|
44
|
+
from ..base import oneDALEstimator
|
|
45
|
+
from ..utils._array_api import get_namespace
|
|
46
|
+
from ..utils.validation import validate_data
|
|
47
|
+
|
|
48
|
+
@control_n_jobs(decorated_methods=["fit", "fit_transform", "predict", "score"])
|
|
49
|
+
class KMeans(oneDALEstimator, _sklearn_KMeans):
|
|
50
|
+
__doc__ = _sklearn_KMeans.__doc__
|
|
51
|
+
|
|
52
|
+
if sklearn_check_version("1.2"):
|
|
53
|
+
_parameter_constraints: dict = {**_sklearn_KMeans._parameter_constraints}
|
|
54
|
+
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
n_clusters=8,
|
|
58
|
+
*,
|
|
59
|
+
init="k-means++",
|
|
60
|
+
n_init=(
|
|
61
|
+
"auto"
|
|
62
|
+
if sklearn_check_version("1.4")
|
|
63
|
+
else "warn" if sklearn_check_version("1.2") else 10
|
|
64
|
+
),
|
|
65
|
+
max_iter=300,
|
|
66
|
+
tol=1e-4,
|
|
67
|
+
verbose=0,
|
|
68
|
+
random_state=None,
|
|
69
|
+
copy_x=True,
|
|
70
|
+
algorithm="lloyd" if sklearn_check_version("1.1") else "auto",
|
|
71
|
+
):
|
|
72
|
+
super().__init__(
|
|
73
|
+
n_clusters=n_clusters,
|
|
74
|
+
init=init,
|
|
75
|
+
max_iter=max_iter,
|
|
76
|
+
tol=tol,
|
|
77
|
+
n_init=n_init,
|
|
78
|
+
verbose=verbose,
|
|
79
|
+
random_state=random_state,
|
|
80
|
+
copy_x=copy_x,
|
|
81
|
+
algorithm=algorithm,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
def _initialize_onedal_estimator(self):
|
|
85
|
+
onedal_params = {
|
|
86
|
+
"n_clusters": self.n_clusters,
|
|
87
|
+
"init": self.init,
|
|
88
|
+
"max_iter": self.max_iter,
|
|
89
|
+
"tol": self.tol,
|
|
90
|
+
"n_init": self.n_init,
|
|
91
|
+
"verbose": self.verbose,
|
|
92
|
+
"random_state": self.random_state,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
self._onedal_estimator = onedal_KMeans(**onedal_params)
|
|
96
|
+
|
|
97
|
+
def _onedal_fit_supported(self, method_name, X, y=None, sample_weight=None):
|
|
98
|
+
assert method_name == "fit"
|
|
99
|
+
|
|
100
|
+
class_name = self.__class__.__name__
|
|
101
|
+
patching_status = PatchingConditionsChain(f"sklearn.cluster.{class_name}.fit")
|
|
102
|
+
|
|
103
|
+
sample_count = _num_samples(X)
|
|
104
|
+
supported_algs = ["auto", "full", "lloyd", "elkan"]
|
|
105
|
+
|
|
106
|
+
if self.algorithm == "elkan":
|
|
107
|
+
logging.getLogger("sklearnex").info(
|
|
108
|
+
"oneDAL does not support 'elkan', using 'lloyd' algorithm instead."
|
|
109
|
+
)
|
|
110
|
+
correct_count = self.n_clusters < sample_count
|
|
111
|
+
|
|
112
|
+
is_data_supported = (
|
|
113
|
+
_is_csr(X) and daal_check_version((2024, "P", 700))
|
|
114
|
+
) or not issparse(X)
|
|
115
|
+
|
|
116
|
+
_acceptable_sample_weights = self._validate_sample_weight(sample_weight, X)
|
|
117
|
+
|
|
118
|
+
patching_status.and_conditions(
|
|
119
|
+
[
|
|
120
|
+
(
|
|
121
|
+
self.algorithm in supported_algs,
|
|
122
|
+
"Only 'lloyd' algorithm is supported, 'elkan' is computed using lloyd",
|
|
123
|
+
),
|
|
124
|
+
(self.n_clusters != 1, "n_clusters=1 is not supported"),
|
|
125
|
+
(correct_count, "n_clusters is smaller than number of samples"),
|
|
126
|
+
(
|
|
127
|
+
_acceptable_sample_weights,
|
|
128
|
+
"oneDAL doesn't support sample_weight. Accepted options are None, constant, or equal weights.",
|
|
129
|
+
),
|
|
130
|
+
(
|
|
131
|
+
is_data_supported,
|
|
132
|
+
"Supported data formats: Dense, CSR (oneDAL version >= 2024.7.0).",
|
|
133
|
+
),
|
|
134
|
+
]
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
return patching_status
|
|
138
|
+
|
|
139
|
+
def fit(self, X, y=None, sample_weight=None):
|
|
140
|
+
if sklearn_check_version("1.2"):
|
|
141
|
+
self._validate_params()
|
|
142
|
+
|
|
143
|
+
dispatch(
|
|
144
|
+
self,
|
|
145
|
+
"fit",
|
|
146
|
+
{
|
|
147
|
+
"onedal": self.__class__._onedal_fit,
|
|
148
|
+
"sklearn": _sklearn_KMeans.fit,
|
|
149
|
+
},
|
|
150
|
+
X,
|
|
151
|
+
y,
|
|
152
|
+
sample_weight,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
return self
|
|
156
|
+
|
|
157
|
+
def _onedal_fit(self, X, _, sample_weight, queue=None):
|
|
158
|
+
X = validate_data(
|
|
159
|
+
self,
|
|
160
|
+
X,
|
|
161
|
+
accept_sparse="csr",
|
|
162
|
+
dtype=[np.float64, np.float32],
|
|
163
|
+
order="C",
|
|
164
|
+
copy=self.copy_x,
|
|
165
|
+
accept_large_sparse=False,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
if sklearn_check_version("1.2"):
|
|
169
|
+
self._check_params_vs_input(X)
|
|
170
|
+
else:
|
|
171
|
+
self._check_params(X)
|
|
172
|
+
|
|
173
|
+
self._n_features_out = self.n_clusters
|
|
174
|
+
|
|
175
|
+
self._initialize_onedal_estimator()
|
|
176
|
+
self._n_threads = _openmp_effective_n_threads()
|
|
177
|
+
self._onedal_estimator.fit(X, queue=queue)
|
|
178
|
+
|
|
179
|
+
self._save_attributes()
|
|
180
|
+
|
|
181
|
+
def _validate_sample_weight(self, sample_weight, X):
|
|
182
|
+
if sample_weight is None:
|
|
183
|
+
return True
|
|
184
|
+
elif isinstance(sample_weight, numbers.Number) or isinstance(
|
|
185
|
+
sample_weight, str
|
|
186
|
+
):
|
|
187
|
+
return True
|
|
188
|
+
else:
|
|
189
|
+
sample_weight = _check_sample_weight(
|
|
190
|
+
sample_weight,
|
|
191
|
+
X,
|
|
192
|
+
dtype=X.dtype if hasattr(X, "dtype") else None,
|
|
193
|
+
)
|
|
194
|
+
if np.all(sample_weight == sample_weight[0]):
|
|
195
|
+
return True
|
|
196
|
+
else:
|
|
197
|
+
return False
|
|
198
|
+
|
|
199
|
+
def _onedal_predict_supported(self, method_name, *data):
|
|
200
|
+
class_name = self.__class__.__name__
|
|
201
|
+
|
|
202
|
+
patching_status = PatchingConditionsChain(
|
|
203
|
+
f"sklearn.cluster.{class_name}.{method_name}"
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
X = data[0]
|
|
207
|
+
sample_weight = data[-1] if len(data) > 1 else None
|
|
208
|
+
|
|
209
|
+
is_data_supported = (
|
|
210
|
+
_is_csr(X) and daal_check_version((2024, "P", 700))
|
|
211
|
+
) or not issparse(X)
|
|
212
|
+
|
|
213
|
+
# algorithm "auto" has been deprecated since 1.1,
|
|
214
|
+
# algorithm "full" has been replaced by "lloyd"
|
|
215
|
+
supported_algs = ["auto", "full", "lloyd", "elkan"]
|
|
216
|
+
if self.algorithm == "elkan":
|
|
217
|
+
logging.getLogger("sklearnex").info(
|
|
218
|
+
"oneDAL does not support 'elkan', using 'lloyd' algorithm instead."
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
_acceptable_sample_weights = True
|
|
222
|
+
if not sklearn_check_version("1.5"):
|
|
223
|
+
_acceptable_sample_weights = self._validate_sample_weight(
|
|
224
|
+
sample_weight, X
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
patching_status.and_conditions(
|
|
228
|
+
[
|
|
229
|
+
(
|
|
230
|
+
self.algorithm in supported_algs,
|
|
231
|
+
"Only 'lloyd' algorithm is supported, 'elkan' is computed using lloyd.",
|
|
232
|
+
),
|
|
233
|
+
(self.n_clusters != 1, "n_clusters=1 is not supported"),
|
|
234
|
+
(
|
|
235
|
+
is_data_supported,
|
|
236
|
+
"Supported data formats: Dense, CSR (oneDAL version >= 2024.7.0).",
|
|
237
|
+
),
|
|
238
|
+
(
|
|
239
|
+
_acceptable_sample_weights,
|
|
240
|
+
"oneDAL doesn't support sample_weight. Acceptable options are None, constant, or equal weights.",
|
|
241
|
+
),
|
|
242
|
+
]
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
return patching_status
|
|
246
|
+
|
|
247
|
+
if sklearn_check_version("1.5"):
|
|
248
|
+
|
|
249
|
+
@wrap_output_data
|
|
250
|
+
def predict(self, X):
|
|
251
|
+
self._validate_params()
|
|
252
|
+
check_is_fitted(self)
|
|
253
|
+
return dispatch(
|
|
254
|
+
self,
|
|
255
|
+
"predict",
|
|
256
|
+
{
|
|
257
|
+
"onedal": self.__class__._onedal_predict,
|
|
258
|
+
"sklearn": _sklearn_KMeans.predict,
|
|
259
|
+
},
|
|
260
|
+
X,
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
else:
|
|
264
|
+
|
|
265
|
+
@wrap_output_data
|
|
266
|
+
def predict(
|
|
267
|
+
self,
|
|
268
|
+
X,
|
|
269
|
+
sample_weight="deprecated" if sklearn_check_version("1.3") else None,
|
|
270
|
+
):
|
|
271
|
+
if sklearn_check_version("1.2"):
|
|
272
|
+
self._validate_params()
|
|
273
|
+
|
|
274
|
+
if sklearn_check_version("1.3"):
|
|
275
|
+
if isinstance(sample_weight, str) and sample_weight == "deprecated":
|
|
276
|
+
sample_weight = None
|
|
277
|
+
|
|
278
|
+
if sample_weight is not None:
|
|
279
|
+
warnings.warn(
|
|
280
|
+
"'sample_weight' was deprecated in version 1.3 and "
|
|
281
|
+
"will be removed in 1.5.",
|
|
282
|
+
FutureWarning,
|
|
283
|
+
)
|
|
284
|
+
check_is_fitted(self)
|
|
285
|
+
return dispatch(
|
|
286
|
+
self,
|
|
287
|
+
"predict",
|
|
288
|
+
{
|
|
289
|
+
"onedal": self.__class__._onedal_predict,
|
|
290
|
+
"sklearn": _sklearn_KMeans.predict,
|
|
291
|
+
},
|
|
292
|
+
X,
|
|
293
|
+
sample_weight,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
def _onedal_predict(self, X, sample_weight=None, queue=None):
|
|
297
|
+
X = validate_data(
|
|
298
|
+
self,
|
|
299
|
+
X,
|
|
300
|
+
accept_sparse="csr",
|
|
301
|
+
reset=False,
|
|
302
|
+
dtype=[np.float64, np.float32],
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
if not hasattr(self, "_onedal_estimator"):
|
|
306
|
+
self._initialize_onedal_estimator()
|
|
307
|
+
self._onedal_estimator.cluster_centers_ = self.cluster_centers_
|
|
308
|
+
|
|
309
|
+
return self._onedal_estimator.predict(X, queue=queue)
|
|
310
|
+
|
|
311
|
+
def _onedal_supported(self, method_name, *data):
|
|
312
|
+
if method_name == "fit":
|
|
313
|
+
return self._onedal_fit_supported(method_name, *data)
|
|
314
|
+
if method_name in ["predict", "score"]:
|
|
315
|
+
return self._onedal_predict_supported(method_name, *data)
|
|
316
|
+
raise RuntimeError(
|
|
317
|
+
f"Unknown method {method_name} in {self.__class__.__name__}"
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
_onedal_gpu_supported = _onedal_supported
|
|
321
|
+
_onedal_cpu_supported = _onedal_supported
|
|
322
|
+
|
|
323
|
+
def _check_test_data(self, X):
|
|
324
|
+
xp, _ = get_namespace(X)
|
|
325
|
+
X = validate_data(
|
|
326
|
+
self,
|
|
327
|
+
X,
|
|
328
|
+
accept_sparse="csr",
|
|
329
|
+
reset=False,
|
|
330
|
+
dtype=[xp.float64, xp.float32],
|
|
331
|
+
order="C",
|
|
332
|
+
accept_large_sparse=False,
|
|
333
|
+
)
|
|
334
|
+
return X
|
|
335
|
+
|
|
336
|
+
_transform = support_input_format(_sklearn_KMeans._transform)
|
|
337
|
+
transform = support_input_format(_sklearn_KMeans.transform)
|
|
338
|
+
|
|
339
|
+
@wrap_output_data
|
|
340
|
+
def score(self, X, y=None, sample_weight=None):
|
|
341
|
+
check_is_fitted(self)
|
|
342
|
+
return dispatch(
|
|
343
|
+
self,
|
|
344
|
+
"score",
|
|
345
|
+
{
|
|
346
|
+
"onedal": self.__class__._onedal_score,
|
|
347
|
+
"sklearn": _sklearn_KMeans.score,
|
|
348
|
+
},
|
|
349
|
+
X,
|
|
350
|
+
y,
|
|
351
|
+
sample_weight,
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
def _onedal_score(self, X, y=None, sample_weight=None, queue=None):
|
|
355
|
+
X = validate_data(
|
|
356
|
+
self,
|
|
357
|
+
X,
|
|
358
|
+
accept_sparse="csr",
|
|
359
|
+
reset=False,
|
|
360
|
+
dtype=[np.float64, np.float32],
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
if not sklearn_check_version("1.5") and sklearn_check_version("1.3"):
|
|
364
|
+
if isinstance(sample_weight, str) and sample_weight == "deprecated":
|
|
365
|
+
sample_weight = None
|
|
366
|
+
|
|
367
|
+
if sample_weight is not None:
|
|
368
|
+
warnings.warn(
|
|
369
|
+
"'sample_weight' was deprecated in version 1.3 and "
|
|
370
|
+
"will be removed in 1.5.",
|
|
371
|
+
FutureWarning,
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
if not hasattr(self, "_onedal_estimator"):
|
|
375
|
+
self._initialize_onedal_estimator()
|
|
376
|
+
self._onedal_estimator.cluster_centers_ = self.cluster_centers_
|
|
377
|
+
|
|
378
|
+
return self._onedal_estimator.score(X, queue=queue)
|
|
379
|
+
|
|
380
|
+
def _save_attributes(self):
|
|
381
|
+
assert hasattr(self, "_onedal_estimator")
|
|
382
|
+
self.cluster_centers_ = self._onedal_estimator.cluster_centers_
|
|
383
|
+
self.labels_ = self._onedal_estimator.labels_
|
|
384
|
+
self.inertia_ = self._onedal_estimator.inertia_
|
|
385
|
+
self.n_iter_ = self._onedal_estimator.n_iter_
|
|
386
|
+
self.n_features_in_ = self._onedal_estimator.n_features_in_
|
|
387
|
+
|
|
388
|
+
self._n_init = self._onedal_estimator._n_init
|
|
389
|
+
|
|
390
|
+
fit.__doc__ = _sklearn_KMeans.fit.__doc__
|
|
391
|
+
predict.__doc__ = _sklearn_KMeans.predict.__doc__
|
|
392
|
+
score.__doc__ = _sklearn_KMeans.score.__doc__
|
|
393
|
+
|
|
394
|
+
else:
|
|
395
|
+
from daal4py.sklearn.cluster import KMeans
|
|
396
|
+
|
|
397
|
+
logging.warning(
|
|
398
|
+
"Sklearnex KMeans requires oneDAL version >= 2023.2, falling back to daal4py."
|
|
399
|
+
)
|
scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/tests/test_dbscan.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# ===============================================================================
|
|
2
|
+
# Copyright 2021 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
|
+
import numpy as np
|
|
18
|
+
import pytest
|
|
19
|
+
from numpy.testing import assert_allclose
|
|
20
|
+
|
|
21
|
+
from onedal.tests.utils._dataframes_support import (
|
|
22
|
+
_convert_to_dataframe,
|
|
23
|
+
get_dataframes_and_queues,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.parametrize("dataframe,queue", get_dataframes_and_queues())
|
|
28
|
+
def test_sklearnex_import_dbscan(dataframe, queue):
|
|
29
|
+
from sklearnex.cluster import DBSCAN
|
|
30
|
+
|
|
31
|
+
X = np.array([[1, 2], [2, 2], [2, 3], [8, 7], [8, 8], [25, 80]])
|
|
32
|
+
X = _convert_to_dataframe(X, sycl_queue=queue, target_df=dataframe)
|
|
33
|
+
dbscan = DBSCAN(eps=3, min_samples=2).fit(X)
|
|
34
|
+
assert "sklearnex" in dbscan.__module__
|
|
35
|
+
|
|
36
|
+
result = dbscan.labels_
|
|
37
|
+
expected = np.array([0, 0, 0, 1, 1, -1], dtype=np.int32)
|
|
38
|
+
assert_allclose(expected, result)
|
scikit_learn_intelex-2025.10.0.data/data/Lib/site-packages/sklearnex/cluster/tests/test_kmeans.py
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# ===============================================================================
|
|
2
|
+
# Copyright 2021 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
|
+
import numpy as np
|
|
18
|
+
import pytest
|
|
19
|
+
from numpy.testing import assert_allclose
|
|
20
|
+
from scipy.sparse import csr_matrix
|
|
21
|
+
from sklearn.datasets import make_blobs
|
|
22
|
+
|
|
23
|
+
from daal4py.sklearn._utils import daal_check_version, sklearn_check_version
|
|
24
|
+
from onedal.tests.utils._dataframes_support import (
|
|
25
|
+
_as_numpy,
|
|
26
|
+
_convert_to_dataframe,
|
|
27
|
+
get_dataframes_and_queues,
|
|
28
|
+
get_queues,
|
|
29
|
+
)
|
|
30
|
+
from sklearnex import config_context
|
|
31
|
+
from sklearnex.tests.utils import _IS_INTEL
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def generate_dense_dataset(n_samples, n_features, density, n_clusters):
|
|
35
|
+
np.random.seed(2024 + n_samples + n_features + n_clusters)
|
|
36
|
+
X, _ = make_blobs(
|
|
37
|
+
n_samples=n_samples,
|
|
38
|
+
n_features=n_features,
|
|
39
|
+
centers=n_clusters,
|
|
40
|
+
cluster_std=1.0,
|
|
41
|
+
random_state=42,
|
|
42
|
+
)
|
|
43
|
+
mask = np.random.binomial(1, density, (n_samples, n_features))
|
|
44
|
+
X = X * mask
|
|
45
|
+
return X
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@pytest.mark.parametrize("dataframe,queue", get_dataframes_and_queues())
|
|
49
|
+
@pytest.mark.parametrize(
|
|
50
|
+
"algorithm", ["lloyd" if sklearn_check_version("1.1") else "full", "elkan"]
|
|
51
|
+
)
|
|
52
|
+
@pytest.mark.parametrize("init", ["k-means++", "random"])
|
|
53
|
+
def test_sklearnex_import_for_dense_data(dataframe, queue, algorithm, init):
|
|
54
|
+
from sklearnex.cluster import KMeans
|
|
55
|
+
|
|
56
|
+
X_dense = generate_dense_dataset(1000, 10, 0.5, 3)
|
|
57
|
+
X_dense_df = _convert_to_dataframe(X_dense, sycl_queue=queue, target_df=dataframe)
|
|
58
|
+
|
|
59
|
+
kmeans_dense = KMeans(
|
|
60
|
+
n_clusters=3, random_state=0, algorithm=algorithm, init=init
|
|
61
|
+
).fit(X_dense_df)
|
|
62
|
+
|
|
63
|
+
if daal_check_version((2023, "P", 200)):
|
|
64
|
+
assert "sklearnex" in kmeans_dense.__module__
|
|
65
|
+
else:
|
|
66
|
+
assert "daal4py" in kmeans_dense.__module__
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@pytest.mark.skipif(
|
|
70
|
+
not daal_check_version((2024, "P", 700)),
|
|
71
|
+
reason="Sparse data requires oneDAL>=2024.7.0",
|
|
72
|
+
)
|
|
73
|
+
@pytest.mark.parametrize("queue", get_queues())
|
|
74
|
+
@pytest.mark.parametrize(
|
|
75
|
+
"algorithm", ["lloyd" if sklearn_check_version("1.1") else "full", "elkan"]
|
|
76
|
+
)
|
|
77
|
+
@pytest.mark.parametrize("init", ["k-means++", "random"])
|
|
78
|
+
def test_sklearnex_import_for_sparse_data(queue, algorithm, init):
|
|
79
|
+
from sklearnex.cluster import KMeans
|
|
80
|
+
|
|
81
|
+
X_dense = generate_dense_dataset(1000, 10, 0.5, 3)
|
|
82
|
+
X_sparse = csr_matrix(X_dense)
|
|
83
|
+
|
|
84
|
+
kmeans_sparse = KMeans(
|
|
85
|
+
n_clusters=3, random_state=0, algorithm=algorithm, init=init
|
|
86
|
+
).fit(X_sparse)
|
|
87
|
+
|
|
88
|
+
assert "sklearnex" in kmeans_sparse.__module__
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@pytest.mark.parametrize("dataframe,queue", get_dataframes_and_queues())
|
|
92
|
+
@pytest.mark.parametrize(
|
|
93
|
+
"algorithm", ["lloyd" if sklearn_check_version("1.1") else "full", "elkan"]
|
|
94
|
+
)
|
|
95
|
+
def test_results_on_dense_gold_data(dataframe, queue, algorithm):
|
|
96
|
+
from sklearnex.cluster import KMeans
|
|
97
|
+
|
|
98
|
+
X_train = np.array([[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]])
|
|
99
|
+
X_test = np.array([[0, 0], [12, 3]])
|
|
100
|
+
X_train_df = _convert_to_dataframe(X_train, sycl_queue=queue, target_df=dataframe)
|
|
101
|
+
X_test_df = _convert_to_dataframe(X_test, sycl_queue=queue, target_df=dataframe)
|
|
102
|
+
|
|
103
|
+
kmeans = KMeans(n_clusters=2, random_state=0, algorithm=algorithm).fit(X_train_df)
|
|
104
|
+
|
|
105
|
+
if queue and queue.sycl_device.is_gpu:
|
|
106
|
+
# KMeans Init Dense GPU implementation is different from CPU
|
|
107
|
+
expected_cluster_labels = np.array([0, 1], dtype=np.int32)
|
|
108
|
+
expected_cluster_centers = np.array([[1.0, 2.0], [10.0, 2.0]], dtype=np.float32)
|
|
109
|
+
expected_inertia = 16.0
|
|
110
|
+
else:
|
|
111
|
+
expected_cluster_labels = np.array([1, 0], dtype=np.int32)
|
|
112
|
+
expected_cluster_centers = np.array([[10.0, 2.0], [1.0, 2.0]], dtype=np.float32)
|
|
113
|
+
expected_inertia = 16.0
|
|
114
|
+
|
|
115
|
+
assert_allclose(expected_cluster_labels, _as_numpy(kmeans.predict(X_test_df)))
|
|
116
|
+
assert_allclose(expected_cluster_centers, _as_numpy(kmeans.cluster_centers_))
|
|
117
|
+
assert expected_inertia == kmeans.inertia_
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@pytest.mark.skipif(
|
|
121
|
+
not daal_check_version((2024, "P", 700)),
|
|
122
|
+
reason="Sparse data requires oneDAL>=2024.7.0",
|
|
123
|
+
)
|
|
124
|
+
@pytest.mark.parametrize("queue", get_queues())
|
|
125
|
+
@pytest.mark.parametrize("init", ["k-means++", "random", "arraylike"])
|
|
126
|
+
@pytest.mark.parametrize(
|
|
127
|
+
"algorithm", ["lloyd" if sklearn_check_version("1.1") else "full", "elkan"]
|
|
128
|
+
)
|
|
129
|
+
@pytest.mark.parametrize(
|
|
130
|
+
"dims", [(1000, 10, 0.95, 3), (50000, 100, 0.75, 10), (10000, 10, 0.8, 5)]
|
|
131
|
+
)
|
|
132
|
+
def test_dense_vs_sparse(queue, init, algorithm, dims):
|
|
133
|
+
from sklearnex.cluster import KMeans
|
|
134
|
+
|
|
135
|
+
if init == "random" or (not _IS_INTEL and init == "k-means++"):
|
|
136
|
+
pytest.skip(f"{init} initialization for sparse K-means is non-conformant.")
|
|
137
|
+
|
|
138
|
+
# For higher level of sparsity (smaller density) the test may fail
|
|
139
|
+
n_samples, n_features, density, n_clusters = dims
|
|
140
|
+
X_dense = generate_dense_dataset(n_samples, n_features, density, n_clusters)
|
|
141
|
+
X_sparse = csr_matrix(X_dense)
|
|
142
|
+
|
|
143
|
+
if init == "arraylike":
|
|
144
|
+
np.random.seed(2024 + n_samples + n_features + n_clusters)
|
|
145
|
+
init = X_dense[np.random.choice(n_samples, size=n_clusters, replace=False)]
|
|
146
|
+
|
|
147
|
+
kmeans_dense = KMeans(
|
|
148
|
+
n_clusters=n_clusters, random_state=0, init=init, algorithm=algorithm
|
|
149
|
+
).fit(X_dense)
|
|
150
|
+
kmeans_sparse = KMeans(
|
|
151
|
+
n_clusters=n_clusters, random_state=0, init=init, algorithm=algorithm
|
|
152
|
+
).fit(X_sparse)
|
|
153
|
+
|
|
154
|
+
assert_allclose(
|
|
155
|
+
kmeans_dense.cluster_centers_,
|
|
156
|
+
kmeans_sparse.cluster_centers_,
|
|
157
|
+
)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Copyright 2024 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
|
+
import io
|
|
18
|
+
import logging
|
|
19
|
+
|
|
20
|
+
import pytest
|
|
21
|
+
|
|
22
|
+
from daal4py.sklearn._utils import sklearn_check_version
|
|
23
|
+
from sklearnex import config_context, patch_sklearn, unpatch_sklearn
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def pytest_configure(config):
|
|
27
|
+
config.addinivalue_line(
|
|
28
|
+
"markers", "allow_sklearn_fallback: mark test to not check for sklearnex usage"
|
|
29
|
+
)
|
|
30
|
+
config.addinivalue_line(
|
|
31
|
+
"markers", "mpi: mark test to require MPI for distributed testing"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@pytest.hookimpl(hookwrapper=True)
|
|
36
|
+
def pytest_runtest_call(item):
|
|
37
|
+
# setup logger to check for sklearn fallback
|
|
38
|
+
if not item.get_closest_marker("allow_sklearn_fallback"):
|
|
39
|
+
log_stream = io.StringIO()
|
|
40
|
+
log_handler = logging.StreamHandler(log_stream)
|
|
41
|
+
sklearnex_logger = logging.getLogger("sklearnex")
|
|
42
|
+
level = sklearnex_logger.level
|
|
43
|
+
sklearnex_stderr_handler = sklearnex_logger.handlers
|
|
44
|
+
sklearnex_logger.handlers = []
|
|
45
|
+
sklearnex_logger.addHandler(log_handler)
|
|
46
|
+
sklearnex_logger.setLevel(logging.INFO)
|
|
47
|
+
log_handler.setLevel(logging.INFO)
|
|
48
|
+
|
|
49
|
+
yield
|
|
50
|
+
|
|
51
|
+
sklearnex_logger.handlers = sklearnex_stderr_handler
|
|
52
|
+
sklearnex_logger.setLevel(level)
|
|
53
|
+
sklearnex_logger.removeHandler(log_handler)
|
|
54
|
+
text = log_stream.getvalue()
|
|
55
|
+
if "fallback to original Scikit-learn" in text:
|
|
56
|
+
raise TypeError(
|
|
57
|
+
f"test did not properly evaluate sklearnex functionality and fell back to sklearn:\n{text}"
|
|
58
|
+
)
|
|
59
|
+
else:
|
|
60
|
+
yield
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@pytest.fixture
|
|
64
|
+
def with_sklearnex():
|
|
65
|
+
patch_sklearn()
|
|
66
|
+
yield
|
|
67
|
+
unpatch_sklearn()
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
@pytest.fixture
|
|
71
|
+
def with_array_api():
|
|
72
|
+
if sklearn_check_version("1.2"):
|
|
73
|
+
with config_context(array_api_dispatch=True):
|
|
74
|
+
yield
|
|
75
|
+
else:
|
|
76
|
+
yield
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@pytest.fixture
|
|
80
|
+
def without_allow_sklearn_after_onedal():
|
|
81
|
+
with config_context(allow_sklearn_after_onedal=False):
|
|
82
|
+
yield
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# ===============================================================================
|
|
2
|
+
# Copyright 2024 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 .incremental_covariance import IncrementalEmpiricalCovariance
|
|
18
|
+
|
|
19
|
+
__all__ = ["IncrementalEmpiricalCovariance"]
|