scikit-learn-intelex 2024.7.0__py310-none-win_amd64.whl → 2025.0.0__py310-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.
Potentially problematic release.
This version of scikit-learn-intelex might be problematic. Click here for more details.
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/__init__.py +73 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/__main__.py +58 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/_daal4py.cp310-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/doc/third-party-programs.txt +424 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/mb/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/mb/model_builders.py +377 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/mpi_transceiver.cp310-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/__init__.py +40 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/_n_jobs_support.py +242 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/_utils.py +241 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/__init__.py +20 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/dbscan.py +165 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/k_means.py +597 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/cluster/tests/test_dbscan.py +109 -0
- {scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/spmd → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn}/decomposition/__init__.py +2 -2
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/decomposition/_pca.py +524 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/AdaBoostClassifier.py +192 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/GBTDAAL.py +318 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/__init__.py +27 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/_forest.py +1397 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/ensemble/tests/test_decision_forest.py +206 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/__init__.py +29 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/_coordinate_descent.py +848 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/_linear.py +272 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/_ridge.py +325 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/coordinate_descent.py +17 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/linear.py +17 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/logistic_loss.py +195 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/logistic_path.py +1026 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/ridge.py +17 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/tests/test_linear.py +196 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/linear_model/tests/test_ridge.py +69 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/manifold/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/manifold/_t_sne.py +405 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/metrics/__init__.py +20 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/metrics/_pairwise.py +155 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/metrics/_ranking.py +210 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/model_selection/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/model_selection/_split.py +309 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/model_selection/tests/test_split.py +56 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/__init__.py +0 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/dispatcher.py +232 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/_models_info.py +161 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/test_monkeypatch.py +71 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/test_patching.py +87 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/monkeypatch/tests/utils/_launch_algorithms.py +118 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/__init__.py +21 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_base.py +503 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_classification.py +139 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_regression.py +74 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/_unsupervised.py +55 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/neighbors/tests/test_kneighbors.py +113 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/svm/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/svm/svm.py +734 -0
- {scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/spmd/covariance → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/utils}/__init__.py +5 -3
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/utils/base.py +75 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/utils/tests/test_utils.py +51 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/daal4py/sklearn/utils/validation.py +693 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/__init__.py +83 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/_config.py +53 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/_device_offload.py +229 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/_onedal_py_dpc.cp310-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/_onedal_py_host.cp310-win_amd64.pyd +0 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/basic_statistics/basic_statistics.py +107 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/basic_statistics/incremental_basic_statistics.py +160 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/basic_statistics/tests/test_basic_statistics.py +298 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/basic_statistics/tests/test_incremental_basic_statistics.py +196 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/__init__.py +27 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/dbscan.py +110 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/kmeans.py +560 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/kmeans_init.py +115 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/tests/test_dbscan.py +125 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/tests/test_kmeans.py +88 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/cluster/tests/test_kmeans_init.py +93 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/_base.py +38 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/_estimator_checks.py +47 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/_mixin.py +62 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/_policy.py +59 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/_spmd_policy.py +30 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/hyperparameters.py +116 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/common/tests/test_policy.py +75 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/covariance/__init__.py +20 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/covariance/covariance.py +125 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/covariance/incremental_covariance.py +146 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/covariance/tests/test_covariance.py +50 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/covariance/tests/test_incremental_covariance.py +122 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/datatypes/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/datatypes/_data_conversion.py +95 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/datatypes/tests/test_data.py +235 -0
- {scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/decomposition}/__init__.py +3 -2
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/decomposition/incremental_pca.py +204 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/decomposition/pca.py +186 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/decomposition/tests/test_incremental_pca.py +198 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/ensemble/__init__.py +29 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/ensemble/forest.py +720 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/ensemble/tests/test_random_forest.py +97 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/__init__.py +27 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/incremental_linear_model.py +258 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/linear_model.py +329 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/logistic_regression.py +249 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_incremental_linear_regression.py +168 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_incremental_ridge_regression.py +107 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_linear_regression.py +149 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_logistic_regression.py +95 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/linear_model/tests/test_ridge.py +95 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/neighbors/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/neighbors/neighbors.py +778 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/neighbors/tests/test_knn_classification.py +49 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/primitives/__init__.py +27 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/primitives/get_tree.py +25 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/primitives/kernel_functions.py +153 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/primitives/tests/test_kernel_functions.py +159 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/__init__.py +19 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/svm.py +556 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/tests/test_csr_svm.py +351 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/tests/test_nusvc.py +204 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/tests/test_nusvr.py +210 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/tests/test_svc.py +168 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/svm/tests/test_svr.py +243 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/tests/test_common.py +41 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/tests/utils/_dataframes_support.py +168 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/tests/utils/_device_selection.py +107 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/utils/__init__.py +49 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/utils/_array_api.py +91 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/utils/validation.py +432 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/_device_offload.py +36 -13
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/basic_statistics/__init__.py +20 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/basic_statistics/basic_statistics.py +0 -3
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/basic_statistics/incremental_basic_statistics.py +5 -5
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/cluster/__init__.py +1 -1
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/cluster/k_means.py +383 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/cluster/tests/test_kmeans.py +153 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/covariance/incremental_covariance.py +5 -5
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/covariance/tests/test_incremental_covariance.py +11 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/decomposition/pca.py +1 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/dispatcher.py +19 -9
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/ensemble/_forest.py +1 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/__init__.py +2 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/coordinate_descent.py +7 -7
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/incremental_linear.py +5 -6
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/linear_model/incremental_ridge.py +418 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/ridge.py +4 -4
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/tests/test_incremental_linear.py +13 -10
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_incremental_ridge.py +153 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/tests/test_logreg.py +5 -4
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/manifold/t_sne.py +3 -3
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/metrics/pairwise.py +2 -2
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/metrics/ranking.py +2 -2
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/model_selection/split.py +4 -2
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/_lof.py +2 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/common.py +1 -1
- {scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/preview/cluster → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/preview}/__init__.py +1 -3
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/decomposition/incremental_pca.py +8 -8
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/decomposition/tests/test_incremental_pca.py +2 -2
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/linear_model/ridge.py +4 -4
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/__init__.py +20 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/incremental_basic_statistics.py +30 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/tests/test_incremental_basic_statistics_spmd.py +307 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/__init__.py +20 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/incremental_covariance.py +37 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/covariance/tests/test_incremental_covariance_spmd.py +184 -0
- {scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/preview → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition}/__init__.py +4 -1
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/incremental_pca.py +30 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/decomposition/tests/test_incremental_pca_spmd.py +269 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/linear_model/__init__.py +2 -1
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/incremental_linear_model.py +35 -0
- scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/spmd/linear_model/tests/test_incremental_linear_spmd.py +329 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/linear_model/tests/test_logistic_regression_spmd.py +4 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/nusvc.py +1 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/svc.py +1 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/_utils_spmd.py +18 -5
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_memory_usage.py +2 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_patching.py +0 -1
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_run_to_run_stability.py +12 -11
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/utils/__init__.py +1 -2
- scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/utils/_namespace.py → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/sklearnex/utils/_array_api.py +5 -20
- {scikit_learn_intelex-2024.7.0.dist-info → scikit_learn_intelex-2025.0.0.dist-info}/METADATA +3 -2
- scikit_learn_intelex-2025.0.0.dist-info/RECORD +255 -0
- scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/cluster/k_means.py +0 -25
- scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/cluster/tests/test_kmeans.py +0 -42
- scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/preview/cluster/_common.py +0 -84
- scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex/preview/cluster/k_means.py +0 -303
- scikit_learn_intelex-2024.7.0.dist-info/RECORD +0 -122
- {scikit_learn_intelex-2024.7.0.data/data/Lib/site-packages/sklearnex → scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal}/basic_statistics/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/__main__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/_config.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/_utils.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/basic_statistics/tests/test_basic_statistics.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/basic_statistics/tests/test_incremental_basic_statistics.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/cluster/dbscan.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/cluster/tests/test_dbscan.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/conftest.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/covariance/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/decomposition/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/decomposition/tests/test_pca.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/doc/third-party-programs.txt +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/ensemble/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/ensemble/tests/test_forest.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/glob/__main__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/glob/dispatcher.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/linear.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/logistic_path.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/logistic_regression.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/linear_model/tests/test_linear.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/manifold/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/manifold/tests/test_tsne.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/metrics/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/metrics/tests/test_metrics.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/model_selection/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/model_selection/tests/test_model_selection.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/knn_classification.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/knn_regression.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/knn_unsupervised.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/neighbors/tests/test_neighbors.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/covariance/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/covariance/covariance.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/covariance/tests/test_covariance.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/decomposition/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/linear_model/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/preview/linear_model/tests/test_ridge.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/basic_statistics/basic_statistics.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/cluster/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/cluster/dbscan.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/cluster/kmeans.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/cluster/tests/test_dbscan_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/cluster/tests/test_kmeans_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/covariance/covariance.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/covariance/tests/test_covariance_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/decomposition/pca.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/decomposition/tests/test_pca_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/ensemble/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/ensemble/forest.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/ensemble/tests/test_forest_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/linear_model/linear_model.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/linear_model/logistic_regression.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/neighbors/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/neighbors/neighbors.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/__init__.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/_common.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/nusvr.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/svr.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/svm/tests/test_svm.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/_utils.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_common.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_config.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_monkeypatch.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_n_jobs_support.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/tests/test_parallel.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/utils/parallel.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/utils/tests/test_finite.py +0 -0
- {scikit_learn_intelex-2024.7.0.data → scikit_learn_intelex-2025.0.0.data}/data/Lib/site-packages/sklearnex/utils/validation.py +0 -0
- {scikit_learn_intelex-2024.7.0.dist-info → scikit_learn_intelex-2025.0.0.dist-info}/LICENSE.txt +0 -0
- {scikit_learn_intelex-2024.7.0.dist-info → scikit_learn_intelex-2025.0.0.dist-info}/WHEEL +0 -0
- {scikit_learn_intelex-2024.7.0.dist-info → scikit_learn_intelex-2025.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Copyright 2021 Intel Corporation
|
|
3
|
+
# Copyright 2024 Fujitsu Limited
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
# ==============================================================================
|
|
17
|
+
|
|
18
|
+
import platform
|
|
19
|
+
|
|
20
|
+
from daal4py.sklearn._utils import daal_check_version
|
|
21
|
+
|
|
22
|
+
if "Windows" in platform.system():
|
|
23
|
+
import os
|
|
24
|
+
import site
|
|
25
|
+
import sys
|
|
26
|
+
|
|
27
|
+
arch_dir = platform.machine()
|
|
28
|
+
plt_dict = {"x86_64": "intel64", "AMD64": "intel64", "aarch64": "arm"}
|
|
29
|
+
arch_dir = plt_dict[arch_dir] if arch_dir in plt_dict else arch_dir
|
|
30
|
+
path_to_env = site.getsitepackages()[0]
|
|
31
|
+
path_to_libs = os.path.join(path_to_env, "Library", "bin")
|
|
32
|
+
if sys.version_info.minor >= 8:
|
|
33
|
+
if "DALROOT" in os.environ:
|
|
34
|
+
dal_root_redist = os.path.join(os.environ["DALROOT"], "redist", arch_dir)
|
|
35
|
+
if os.path.exists(dal_root_redist):
|
|
36
|
+
os.add_dll_directory(dal_root_redist)
|
|
37
|
+
try:
|
|
38
|
+
os.add_dll_directory(path_to_libs)
|
|
39
|
+
except FileNotFoundError:
|
|
40
|
+
pass
|
|
41
|
+
os.environ["PATH"] = path_to_libs + os.pathsep + os.environ["PATH"]
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
import onedal._onedal_py_dpc as _backend
|
|
45
|
+
|
|
46
|
+
_is_dpc_backend = True
|
|
47
|
+
except ImportError:
|
|
48
|
+
import onedal._onedal_py_host as _backend
|
|
49
|
+
|
|
50
|
+
_is_dpc_backend = False
|
|
51
|
+
|
|
52
|
+
_is_spmd_backend = False
|
|
53
|
+
|
|
54
|
+
if _is_dpc_backend:
|
|
55
|
+
try:
|
|
56
|
+
import onedal._onedal_py_spmd_dpc as _spmd_backend
|
|
57
|
+
|
|
58
|
+
_is_spmd_backend = True
|
|
59
|
+
except ImportError:
|
|
60
|
+
_is_spmd_backend = False
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
__all__ = ["covariance", "decomposition", "ensemble", "neighbors", "primitives", "svm"]
|
|
64
|
+
|
|
65
|
+
if _is_spmd_backend:
|
|
66
|
+
__all__.append("spmd")
|
|
67
|
+
|
|
68
|
+
if daal_check_version((2023, "P", 100)):
|
|
69
|
+
__all__ += ["basic_statistics", "linear_model"]
|
|
70
|
+
|
|
71
|
+
if _is_spmd_backend:
|
|
72
|
+
__all__ += [
|
|
73
|
+
"spmd.basic_statistics",
|
|
74
|
+
"spmd.decomposition",
|
|
75
|
+
"spmd.linear_model",
|
|
76
|
+
"spmd.neighbors",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
if daal_check_version((2023, "P", 200)):
|
|
80
|
+
__all__ += ["cluster"]
|
|
81
|
+
|
|
82
|
+
if _is_spmd_backend:
|
|
83
|
+
__all__ += ["spmd.cluster"]
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
"""Tools to expose some sklearnex's config settings to onedal4py level."""
|
|
18
|
+
|
|
19
|
+
import threading
|
|
20
|
+
|
|
21
|
+
_default_global_config = {
|
|
22
|
+
"target_offload": "auto",
|
|
23
|
+
"allow_fallback_to_host": False,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_threadlocal = threading.local()
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _get_onedal_threadlocal_config():
|
|
30
|
+
if not hasattr(_threadlocal, "global_config"):
|
|
31
|
+
_threadlocal.global_config = _default_global_config.copy()
|
|
32
|
+
return _threadlocal.global_config
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _get_config(copy=True):
|
|
36
|
+
"""Retrieve current values for configuration set
|
|
37
|
+
by :func:`sklearnex.set_config`
|
|
38
|
+
Parameters
|
|
39
|
+
----------
|
|
40
|
+
copy : bool, default=True
|
|
41
|
+
If False, the values of the global config are returned,
|
|
42
|
+
which can further be overwritten.
|
|
43
|
+
Returns
|
|
44
|
+
-------
|
|
45
|
+
config : dict
|
|
46
|
+
Keys are parameter names `target_offload` and
|
|
47
|
+
`allow_fallback_to_host` that can be passed
|
|
48
|
+
to :func:`sklearnex.set_config`.
|
|
49
|
+
"""
|
|
50
|
+
onedal_config = _get_onedal_threadlocal_config()
|
|
51
|
+
if copy:
|
|
52
|
+
onedal_config = onedal_config.copy()
|
|
53
|
+
return onedal_config
|
|
@@ -0,0 +1,229 @@
|
|
|
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
|
+
import logging
|
|
18
|
+
from collections.abc import Iterable
|
|
19
|
+
from functools import wraps
|
|
20
|
+
|
|
21
|
+
import numpy as np
|
|
22
|
+
from sklearn import get_config
|
|
23
|
+
|
|
24
|
+
from ._config import _get_config
|
|
25
|
+
from .utils._array_api import _asarray, _is_numpy_namespace
|
|
26
|
+
|
|
27
|
+
try:
|
|
28
|
+
from dpctl import SyclQueue
|
|
29
|
+
from dpctl.memory import MemoryUSMDevice, as_usm_memory
|
|
30
|
+
from dpctl.tensor import usm_ndarray
|
|
31
|
+
|
|
32
|
+
dpctl_available = True
|
|
33
|
+
except ImportError:
|
|
34
|
+
dpctl_available = False
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
import dpnp
|
|
38
|
+
|
|
39
|
+
from .utils._array_api import _convert_to_dpnp
|
|
40
|
+
|
|
41
|
+
dpnp_available = True
|
|
42
|
+
except ImportError:
|
|
43
|
+
dpnp_available = False
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class DummySyclQueue:
|
|
47
|
+
"""This class is designed to act like dpctl.SyclQueue
|
|
48
|
+
to allow device dispatching in scenarios when dpctl is not available"""
|
|
49
|
+
|
|
50
|
+
class DummySyclDevice:
|
|
51
|
+
def __init__(self, filter_string):
|
|
52
|
+
self._filter_string = filter_string
|
|
53
|
+
self.is_cpu = "cpu" in filter_string
|
|
54
|
+
self.is_gpu = "gpu" in filter_string
|
|
55
|
+
self.has_aspect_fp64 = self.is_cpu
|
|
56
|
+
|
|
57
|
+
if not (self.is_cpu):
|
|
58
|
+
logging.warning(
|
|
59
|
+
"Device support is limited. "
|
|
60
|
+
"Please install dpctl for full experience"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def get_filter_string(self):
|
|
64
|
+
return self._filter_string
|
|
65
|
+
|
|
66
|
+
def __init__(self, filter_string):
|
|
67
|
+
self.sycl_device = self.DummySyclDevice(filter_string)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _copy_to_usm(queue, array):
|
|
71
|
+
if not dpctl_available:
|
|
72
|
+
raise RuntimeError(
|
|
73
|
+
"dpctl need to be installed to work " "with __sycl_usm_array_interface__"
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
if hasattr(array, "__array__"):
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
mem = MemoryUSMDevice(array.nbytes, queue=queue)
|
|
80
|
+
mem.copy_from_host(array.tobytes())
|
|
81
|
+
return usm_ndarray(array.shape, array.dtype, buffer=mem)
|
|
82
|
+
except ValueError as e:
|
|
83
|
+
# ValueError will raise if device does not support the dtype
|
|
84
|
+
# retry with float32 (needed for fp16 and fp64 support issues)
|
|
85
|
+
# try again as float32, if it is a float32 just raise the error.
|
|
86
|
+
if array.dtype == np.float32:
|
|
87
|
+
raise e
|
|
88
|
+
return _copy_to_usm(queue, array.astype(np.float32))
|
|
89
|
+
else:
|
|
90
|
+
if isinstance(array, Iterable):
|
|
91
|
+
array = [_copy_to_usm(queue, i) for i in array]
|
|
92
|
+
return array
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _transfer_to_host(queue, *data):
|
|
96
|
+
has_usm_data, has_host_data = False, False
|
|
97
|
+
|
|
98
|
+
host_data = []
|
|
99
|
+
for item in data:
|
|
100
|
+
usm_iface = getattr(item, "__sycl_usm_array_interface__", None)
|
|
101
|
+
array_api = getattr(item, "__array_namespace__", lambda: None)()
|
|
102
|
+
if usm_iface is not None:
|
|
103
|
+
if not dpctl_available:
|
|
104
|
+
raise RuntimeError(
|
|
105
|
+
"dpctl need to be installed to work "
|
|
106
|
+
"with __sycl_usm_array_interface__"
|
|
107
|
+
)
|
|
108
|
+
if queue is not None:
|
|
109
|
+
if queue.sycl_device != usm_iface["syclobj"].sycl_device:
|
|
110
|
+
raise RuntimeError(
|
|
111
|
+
"Input data shall be located " "on single target device"
|
|
112
|
+
)
|
|
113
|
+
else:
|
|
114
|
+
queue = usm_iface["syclobj"]
|
|
115
|
+
|
|
116
|
+
buffer = as_usm_memory(item).copy_to_host()
|
|
117
|
+
order = "C"
|
|
118
|
+
if usm_iface["strides"] is not None:
|
|
119
|
+
if usm_iface["strides"][0] < usm_iface["strides"][1]:
|
|
120
|
+
order = "F"
|
|
121
|
+
item = np.ndarray(
|
|
122
|
+
shape=usm_iface["shape"],
|
|
123
|
+
dtype=usm_iface["typestr"],
|
|
124
|
+
buffer=buffer,
|
|
125
|
+
order=order,
|
|
126
|
+
)
|
|
127
|
+
has_usm_data = True
|
|
128
|
+
elif array_api and not _is_numpy_namespace(array_api):
|
|
129
|
+
# `copy`` param for the `asarray`` is not setted.
|
|
130
|
+
# The object is copied only if needed.
|
|
131
|
+
item = np.asarray(item)
|
|
132
|
+
has_host_data = True
|
|
133
|
+
else:
|
|
134
|
+
has_host_data = True
|
|
135
|
+
|
|
136
|
+
mismatch_host_item = usm_iface is None and item is not None and has_usm_data
|
|
137
|
+
mismatch_usm_item = usm_iface is not None and has_host_data
|
|
138
|
+
|
|
139
|
+
if mismatch_host_item or mismatch_usm_item:
|
|
140
|
+
raise RuntimeError("Input data shall be located on single target device")
|
|
141
|
+
|
|
142
|
+
host_data.append(item)
|
|
143
|
+
return queue, host_data
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def _get_global_queue():
|
|
147
|
+
target = _get_config()["target_offload"]
|
|
148
|
+
|
|
149
|
+
QueueClass = DummySyclQueue if not dpctl_available else SyclQueue
|
|
150
|
+
|
|
151
|
+
if target != "auto":
|
|
152
|
+
if isinstance(target, QueueClass):
|
|
153
|
+
return target
|
|
154
|
+
return QueueClass(target)
|
|
155
|
+
return None
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def _get_host_inputs(*args, **kwargs):
|
|
159
|
+
q = _get_global_queue()
|
|
160
|
+
q, hostargs = _transfer_to_host(q, *args)
|
|
161
|
+
q, hostvalues = _transfer_to_host(q, *kwargs.values())
|
|
162
|
+
hostkwargs = dict(zip(kwargs.keys(), hostvalues))
|
|
163
|
+
return q, hostargs, hostkwargs
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def _run_on_device(func, obj=None, *args, **kwargs):
|
|
167
|
+
if obj is not None:
|
|
168
|
+
return func(obj, *args, **kwargs)
|
|
169
|
+
return func(*args, **kwargs)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def support_input_format(freefunc=False, queue_param=True):
|
|
173
|
+
"""
|
|
174
|
+
Converts and moves the output arrays of the decorated function
|
|
175
|
+
to match the input array type and device.
|
|
176
|
+
Puts SYCLQueue from data to decorated function arguments.
|
|
177
|
+
|
|
178
|
+
Parameters
|
|
179
|
+
----------
|
|
180
|
+
freefunc (bool) : Set to True if decorates free function.
|
|
181
|
+
queue_param (bool) : Set to False if the decorated function has no `queue` parameter
|
|
182
|
+
|
|
183
|
+
Notes
|
|
184
|
+
-----
|
|
185
|
+
Queue will not be changed if provided explicitly.
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
def decorator(func):
|
|
189
|
+
def wrapper_impl(obj, *args, **kwargs):
|
|
190
|
+
if len(args) == 0 and len(kwargs) == 0:
|
|
191
|
+
return _run_on_device(func, obj, *args, **kwargs)
|
|
192
|
+
data = (*args, *kwargs.values())
|
|
193
|
+
data_queue, hostargs, hostkwargs = _get_host_inputs(*args, **kwargs)
|
|
194
|
+
if queue_param and not (
|
|
195
|
+
"queue" in hostkwargs and hostkwargs["queue"] is not None
|
|
196
|
+
):
|
|
197
|
+
hostkwargs["queue"] = data_queue
|
|
198
|
+
result = _run_on_device(func, obj, *hostargs, **hostkwargs)
|
|
199
|
+
usm_iface = getattr(data[0], "__sycl_usm_array_interface__", None)
|
|
200
|
+
if usm_iface is not None:
|
|
201
|
+
result = _copy_to_usm(data_queue, result)
|
|
202
|
+
if dpnp_available and isinstance(data[0], dpnp.ndarray):
|
|
203
|
+
result = _convert_to_dpnp(result)
|
|
204
|
+
return result
|
|
205
|
+
config = get_config()
|
|
206
|
+
if not ("transform_output" in config and config["transform_output"]):
|
|
207
|
+
input_array_api = getattr(data[0], "__array_namespace__", lambda: None)()
|
|
208
|
+
if input_array_api:
|
|
209
|
+
input_array_api_device = data[0].device
|
|
210
|
+
result = _asarray(
|
|
211
|
+
result, input_array_api, device=input_array_api_device
|
|
212
|
+
)
|
|
213
|
+
return result
|
|
214
|
+
|
|
215
|
+
if freefunc:
|
|
216
|
+
|
|
217
|
+
@wraps(func)
|
|
218
|
+
def wrapper_free(*args, **kwargs):
|
|
219
|
+
return wrapper_impl(None, *args, **kwargs)
|
|
220
|
+
|
|
221
|
+
return wrapper_free
|
|
222
|
+
|
|
223
|
+
@wraps(func)
|
|
224
|
+
def wrapper_with_self(self, *args, **kwargs):
|
|
225
|
+
return wrapper_impl(self, *args, **kwargs)
|
|
226
|
+
|
|
227
|
+
return wrapper_with_self
|
|
228
|
+
|
|
229
|
+
return decorator
|
scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/_onedal_py_dpc.cp310-win_amd64.pyd
ADDED
|
Binary file
|
scikit_learn_intelex-2025.0.0.data/data/Lib/site-packages/onedal/_onedal_py_host.cp310-win_amd64.pyd
ADDED
|
Binary file
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
import warnings
|
|
18
|
+
from abc import ABCMeta, abstractmethod
|
|
19
|
+
|
|
20
|
+
import numpy as np
|
|
21
|
+
|
|
22
|
+
from ..common._base import BaseEstimator
|
|
23
|
+
from ..datatypes import _convert_to_supported, from_table, to_table
|
|
24
|
+
from ..utils import _is_csr
|
|
25
|
+
from ..utils.validation import _check_array
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class BaseBasicStatistics(BaseEstimator, metaclass=ABCMeta):
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def __init__(self, result_options, algorithm):
|
|
31
|
+
self.options = result_options
|
|
32
|
+
self.algorithm = algorithm
|
|
33
|
+
|
|
34
|
+
@staticmethod
|
|
35
|
+
def get_all_result_options():
|
|
36
|
+
return [
|
|
37
|
+
"min",
|
|
38
|
+
"max",
|
|
39
|
+
"sum",
|
|
40
|
+
"mean",
|
|
41
|
+
"variance",
|
|
42
|
+
"variation",
|
|
43
|
+
"sum_squares",
|
|
44
|
+
"standard_deviation",
|
|
45
|
+
"sum_squares_centered",
|
|
46
|
+
"second_order_raw_moment",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
def _get_result_options(self, options):
|
|
50
|
+
if options == "all":
|
|
51
|
+
options = self.get_all_result_options()
|
|
52
|
+
if isinstance(options, list):
|
|
53
|
+
options = "|".join(options)
|
|
54
|
+
assert isinstance(options, str)
|
|
55
|
+
return options
|
|
56
|
+
|
|
57
|
+
def _get_onedal_params(self, is_csr, dtype=np.float32):
|
|
58
|
+
options = self._get_result_options(self.options)
|
|
59
|
+
return {
|
|
60
|
+
"fptype": "float" if dtype == np.float32 else "double",
|
|
61
|
+
"method": "sparse" if is_csr else self.algorithm,
|
|
62
|
+
"result_option": options,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class BasicStatistics(BaseBasicStatistics):
|
|
67
|
+
"""
|
|
68
|
+
Basic Statistics oneDAL implementation.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
def __init__(self, result_options="all", algorithm="by_default"):
|
|
72
|
+
super().__init__(result_options, algorithm)
|
|
73
|
+
|
|
74
|
+
def fit(self, data, sample_weight=None, queue=None):
|
|
75
|
+
policy = self._get_policy(queue, data, sample_weight)
|
|
76
|
+
|
|
77
|
+
is_csr = _is_csr(data)
|
|
78
|
+
|
|
79
|
+
if data is not None and not is_csr:
|
|
80
|
+
data = _check_array(data, ensure_2d=False)
|
|
81
|
+
if sample_weight is not None:
|
|
82
|
+
sample_weight = _check_array(sample_weight, ensure_2d=False)
|
|
83
|
+
|
|
84
|
+
data, sample_weight = _convert_to_supported(policy, data, sample_weight)
|
|
85
|
+
is_single_dim = data.ndim == 1
|
|
86
|
+
data_table, weights_table = to_table(data, sample_weight)
|
|
87
|
+
|
|
88
|
+
dtype = data.dtype
|
|
89
|
+
raw_result = self._compute_raw(data_table, weights_table, policy, dtype, is_csr)
|
|
90
|
+
for opt, raw_value in raw_result.items():
|
|
91
|
+
value = from_table(raw_value).ravel()
|
|
92
|
+
if is_single_dim:
|
|
93
|
+
setattr(self, opt, value[0])
|
|
94
|
+
else:
|
|
95
|
+
setattr(self, opt, value)
|
|
96
|
+
|
|
97
|
+
return self
|
|
98
|
+
|
|
99
|
+
def _compute_raw(
|
|
100
|
+
self, data_table, weights_table, policy, dtype=np.float32, is_csr=False
|
|
101
|
+
):
|
|
102
|
+
module = self._get_backend("basic_statistics")
|
|
103
|
+
params = self._get_onedal_params(is_csr, dtype)
|
|
104
|
+
result = module.compute(policy, params, data_table, weights_table)
|
|
105
|
+
options = self._get_result_options(self.options).split("|")
|
|
106
|
+
|
|
107
|
+
return {opt: getattr(result, opt) for opt in options}
|
|
@@ -0,0 +1,160 @@
|
|
|
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 numpy as np
|
|
18
|
+
|
|
19
|
+
from daal4py.sklearn._utils import get_dtype
|
|
20
|
+
|
|
21
|
+
from ..datatypes import _convert_to_supported, from_table, to_table
|
|
22
|
+
from ..utils import _check_array
|
|
23
|
+
from .basic_statistics import BaseBasicStatistics
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class IncrementalBasicStatistics(BaseBasicStatistics):
|
|
27
|
+
"""
|
|
28
|
+
Incremental estimator for basic statistics based on oneDAL implementation.
|
|
29
|
+
Allows to compute basic statistics if data are splitted into batches.
|
|
30
|
+
Parameters
|
|
31
|
+
----------
|
|
32
|
+
result_options: string or list, default='all'
|
|
33
|
+
List of statistics to compute
|
|
34
|
+
|
|
35
|
+
Attributes (are existing only if corresponding result option exists)
|
|
36
|
+
----------
|
|
37
|
+
min : ndarray of shape (n_features,)
|
|
38
|
+
Minimum of each feature over all samples.
|
|
39
|
+
|
|
40
|
+
max : ndarray of shape (n_features,)
|
|
41
|
+
Maximum of each feature over all samples.
|
|
42
|
+
|
|
43
|
+
sum : ndarray of shape (n_features,)
|
|
44
|
+
Sum of each feature over all samples.
|
|
45
|
+
|
|
46
|
+
mean : ndarray of shape (n_features,)
|
|
47
|
+
Mean of each feature over all samples.
|
|
48
|
+
|
|
49
|
+
variance : ndarray of shape (n_features,)
|
|
50
|
+
Variance of each feature over all samples.
|
|
51
|
+
|
|
52
|
+
variation : ndarray of shape (n_features,)
|
|
53
|
+
Variation of each feature over all samples.
|
|
54
|
+
|
|
55
|
+
sum_squares : ndarray of shape (n_features,)
|
|
56
|
+
Sum of squares for each feature over all samples.
|
|
57
|
+
|
|
58
|
+
standard_deviation : ndarray of shape (n_features,)
|
|
59
|
+
Standard deviation of each feature over all samples.
|
|
60
|
+
|
|
61
|
+
sum_squares_centered : ndarray of shape (n_features,)
|
|
62
|
+
Centered sum of squares for each feature over all samples.
|
|
63
|
+
|
|
64
|
+
second_order_raw_moment : ndarray of shape (n_features,)
|
|
65
|
+
Second order moment of each feature over all samples.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
def __init__(self, result_options="all"):
|
|
69
|
+
super().__init__(result_options, algorithm="by_default")
|
|
70
|
+
self._reset()
|
|
71
|
+
|
|
72
|
+
def _reset(self):
|
|
73
|
+
self._partial_result = self._get_backend(
|
|
74
|
+
"basic_statistics", None, "partial_compute_result"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def partial_fit(self, X, weights=None, queue=None):
|
|
78
|
+
"""
|
|
79
|
+
Computes partial data for basic statistics
|
|
80
|
+
from data batch X and saves it to `_partial_result`.
|
|
81
|
+
|
|
82
|
+
Parameters
|
|
83
|
+
----------
|
|
84
|
+
X : array-like of shape (n_samples, n_features)
|
|
85
|
+
Training data batch, where `n_samples` is the number of samples
|
|
86
|
+
in the batch, and `n_features` is the number of features.
|
|
87
|
+
|
|
88
|
+
queue : dpctl.SyclQueue
|
|
89
|
+
If not None, use this queue for computations.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
self : object
|
|
94
|
+
Returns the instance itself.
|
|
95
|
+
"""
|
|
96
|
+
self._queue = queue
|
|
97
|
+
policy = self._get_policy(queue, X)
|
|
98
|
+
X, weights = _convert_to_supported(policy, X, weights)
|
|
99
|
+
|
|
100
|
+
X = _check_array(
|
|
101
|
+
X, dtype=[np.float64, np.float32], ensure_2d=False, force_all_finite=False
|
|
102
|
+
)
|
|
103
|
+
if weights is not None:
|
|
104
|
+
weights = _check_array(
|
|
105
|
+
weights,
|
|
106
|
+
dtype=[np.float64, np.float32],
|
|
107
|
+
ensure_2d=False,
|
|
108
|
+
force_all_finite=False,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
if not hasattr(self, "_onedal_params"):
|
|
112
|
+
dtype = get_dtype(X)
|
|
113
|
+
self._onedal_params = self._get_onedal_params(False, dtype=dtype)
|
|
114
|
+
|
|
115
|
+
X_table, weights_table = to_table(X, weights)
|
|
116
|
+
self._partial_result = self._get_backend(
|
|
117
|
+
"basic_statistics",
|
|
118
|
+
None,
|
|
119
|
+
"partial_compute",
|
|
120
|
+
policy,
|
|
121
|
+
self._onedal_params,
|
|
122
|
+
self._partial_result,
|
|
123
|
+
X_table,
|
|
124
|
+
weights_table,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def finalize_fit(self, queue=None):
|
|
128
|
+
"""
|
|
129
|
+
Finalizes basic statistics computation and obtains result
|
|
130
|
+
attributes from the current `_partial_result`.
|
|
131
|
+
|
|
132
|
+
Parameters
|
|
133
|
+
----------
|
|
134
|
+
queue : dpctl.SyclQueue
|
|
135
|
+
If not None, use this queue for computations.
|
|
136
|
+
|
|
137
|
+
Returns
|
|
138
|
+
-------
|
|
139
|
+
self : object
|
|
140
|
+
Returns the instance itself.
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
if queue is not None:
|
|
144
|
+
policy = self._get_policy(queue)
|
|
145
|
+
else:
|
|
146
|
+
policy = self._get_policy(self._queue)
|
|
147
|
+
|
|
148
|
+
result = self._get_backend(
|
|
149
|
+
"basic_statistics",
|
|
150
|
+
None,
|
|
151
|
+
"finalize_compute",
|
|
152
|
+
policy,
|
|
153
|
+
self._onedal_params,
|
|
154
|
+
self._partial_result,
|
|
155
|
+
)
|
|
156
|
+
options = self._get_result_options(self.options).split("|")
|
|
157
|
+
for opt in options:
|
|
158
|
+
setattr(self, opt, from_table(getattr(result, opt)).ravel())
|
|
159
|
+
|
|
160
|
+
return self
|