scikit-learn-intelex 2025.4.0__py311-none-manylinux_2_28_x86_64.whl → 2025.6.0__py311-none-manylinux_2_28_x86_64.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.
- daal4py/__main__.py +1 -1
- daal4py/_daal4py.cpython-311-x86_64-linux-gnu.so +0 -0
- daal4py/mb/__init__.py +69 -5
- daal4py/mb/gbt_convertors.py +922 -0
- daal4py/mb/logistic_regression_builders.py +217 -0
- daal4py/mb/{model_builders.py → tree_based_builders.py} +129 -106
- daal4py/mpi_transceiver.cpython-311-x86_64-linux-gnu.so +0 -0
- daal4py/sklearn/_n_jobs_support.py +6 -2
- daal4py/sklearn/_utils.py +1 -1
- daal4py/sklearn/cluster/dbscan.py +2 -2
- daal4py/sklearn/cluster/k_means.py +6 -38
- daal4py/sklearn/decomposition/_pca.py +12 -8
- daal4py/sklearn/ensemble/AdaBoostClassifier.py +2 -6
- daal4py/sklearn/ensemble/GBTDAAL.py +3 -7
- daal4py/sklearn/ensemble/_forest.py +41 -153
- daal4py/sklearn/linear_model/_coordinate_descent.py +13 -15
- daal4py/sklearn/linear_model/_linear.py +7 -10
- daal4py/sklearn/linear_model/_ridge.py +22 -57
- daal4py/sklearn/linear_model/logistic_path.py +3 -4
- daal4py/sklearn/manifold/_t_sne.py +8 -3
- daal4py/sklearn/metrics/_pairwise.py +30 -7
- daal4py/sklearn/monkeypatch/dispatcher.py +3 -3
- daal4py/sklearn/neighbors/_base.py +6 -16
- daal4py/sklearn/neighbors/_classification.py +4 -7
- daal4py/sklearn/neighbors/_regression.py +3 -5
- daal4py/sklearn/svm/svm.py +4 -2
- daal4py/sklearn/utils/base.py +8 -3
- daal4py/sklearn/utils/validation.py +82 -5
- onedal/__init__.py +66 -24
- onedal/_config.py +27 -2
- onedal/_device_offload.py +86 -82
- onedal/_onedal_py_dpc.cpython-311-x86_64-linux-gnu.so +0 -0
- onedal/_onedal_py_host.cpython-311-x86_64-linux-gnu.so +0 -0
- onedal/_onedal_py_spmd_dpc.cpython-311-x86_64-linux-gnu.so +0 -0
- onedal/basic_statistics/basic_statistics.py +21 -17
- onedal/basic_statistics/incremental_basic_statistics.py +44 -39
- onedal/cluster/dbscan.py +35 -42
- onedal/cluster/kmeans.py +83 -74
- onedal/cluster/kmeans_init.py +57 -24
- onedal/common/_backend.py +233 -0
- onedal/common/hyperparameters.py +4 -4
- onedal/common/tests/test_sycl.py +27 -12
- onedal/covariance/covariance.py +27 -19
- onedal/covariance/incremental_covariance.py +35 -32
- onedal/datatypes/_data_conversion.py +6 -10
- onedal/datatypes/tests/test_data.py +179 -78
- onedal/decomposition/incremental_pca.py +39 -25
- onedal/decomposition/pca.py +28 -16
- onedal/decomposition/tests/test_incremental_pca.py +2 -2
- onedal/ensemble/forest.py +130 -93
- onedal/linear_model/incremental_linear_model.py +76 -57
- onedal/linear_model/linear_model.py +63 -37
- onedal/linear_model/logistic_regression.py +96 -68
- onedal/neighbors/neighbors.py +156 -119
- onedal/primitives/get_tree.py +5 -3
- onedal/primitives/kernel_functions.py +21 -18
- onedal/primitives/tests/test_kernel_functions.py +4 -4
- onedal/spmd/__init__.py +10 -0
- onedal/spmd/basic_statistics/basic_statistics.py +7 -9
- onedal/spmd/basic_statistics/incremental_basic_statistics.py +6 -48
- onedal/spmd/cluster/__init__.py +3 -5
- onedal/spmd/cluster/dbscan.py +5 -5
- onedal/spmd/cluster/kmeans.py +37 -20
- onedal/spmd/covariance/covariance.py +11 -5
- onedal/spmd/covariance/incremental_covariance.py +4 -62
- onedal/spmd/decomposition/incremental_pca.py +4 -97
- onedal/spmd/decomposition/pca.py +11 -5
- onedal/spmd/ensemble/forest.py +13 -5
- onedal/spmd/linear_model/incremental_linear_model.py +4 -72
- onedal/spmd/linear_model/linear_model.py +15 -6
- onedal/spmd/linear_model/logistic_regression.py +14 -8
- onedal/spmd/neighbors/__init__.py +2 -2
- onedal/spmd/neighbors/neighbors.py +36 -25
- onedal/svm/svm.py +80 -32
- onedal/svm/tests/test_csr_svm.py +10 -9
- onedal/svm/tests/test_nusvc.py +10 -10
- onedal/svm/tests/test_nusvr.py +8 -8
- onedal/svm/tests/test_svc.py +5 -5
- onedal/svm/tests/test_svr.py +10 -10
- onedal/tests/utils/_device_selection.py +3 -13
- onedal/utils/_array_api.py +14 -2
- onedal/utils/_dpep_helpers.py +16 -1
- onedal/utils/_sycl_queue_manager.py +161 -0
- onedal/utils/tests/test_validation.py +3 -3
- onedal/utils/validation.py +47 -16
- {scikit_learn_intelex-2025.4.0.dist-info → scikit_learn_intelex-2025.6.0.dist-info}/METADATA +2 -3
- scikit_learn_intelex-2025.6.0.dist-info/RECORD +279 -0
- sklearnex/__init__.py +3 -2
- sklearnex/__main__.py +2 -2
- sklearnex/_config.py +48 -6
- sklearnex/_device_offload.py +136 -68
- sklearnex/_utils.py +36 -43
- sklearnex/base.py +109 -0
- sklearnex/basic_statistics/basic_statistics.py +14 -20
- sklearnex/basic_statistics/incremental_basic_statistics.py +31 -40
- sklearnex/cluster/dbscan.py +10 -11
- sklearnex/cluster/k_means.py +20 -19
- sklearnex/covariance/incremental_covariance.py +49 -62
- sklearnex/decomposition/pca.py +9 -20
- sklearnex/dispatcher.py +4 -4
- sklearnex/doc/third-party-programs.txt +207 -2
- sklearnex/ensemble/_forest.py +111 -366
- sklearnex/glob/__main__.py +1 -1
- sklearnex/glob/dispatcher.py +1 -1
- sklearnex/linear_model/coordinate_descent.py +18 -6
- sklearnex/linear_model/incremental_linear.py +41 -126
- sklearnex/linear_model/incremental_ridge.py +37 -85
- sklearnex/linear_model/linear.py +52 -47
- sklearnex/linear_model/logistic_regression.py +45 -84
- sklearnex/linear_model/ridge.py +17 -20
- sklearnex/linear_model/tests/test_linear.py +60 -1
- sklearnex/linear_model/tests/test_logreg.py +2 -2
- sklearnex/manifold/t_sne.py +8 -6
- sklearnex/metrics/pairwise.py +1 -3
- sklearnex/metrics/ranking.py +1 -1
- sklearnex/model_selection/split.py +1 -3
- sklearnex/neighbors/_lof.py +7 -54
- sklearnex/neighbors/common.py +6 -5
- sklearnex/neighbors/knn_classification.py +31 -73
- sklearnex/neighbors/knn_regression.py +30 -70
- sklearnex/neighbors/knn_unsupervised.py +5 -13
- sklearnex/preview/covariance/covariance.py +6 -19
- sklearnex/preview/decomposition/incremental_pca.py +45 -62
- sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py +10 -3
- sklearnex/spmd/basic_statistics/tests/test_incremental_basic_statistics_spmd.py +8 -4
- sklearnex/spmd/cluster/tests/test_dbscan_spmd.py +13 -2
- sklearnex/spmd/cluster/tests/test_kmeans_spmd.py +10 -3
- sklearnex/spmd/covariance/tests/test_covariance_spmd.py +7 -4
- sklearnex/spmd/covariance/tests/test_incremental_covariance_spmd.py +13 -2
- sklearnex/spmd/decomposition/tests/test_incremental_pca_spmd.py +9 -2
- sklearnex/spmd/decomposition/tests/test_pca_spmd.py +7 -2
- sklearnex/spmd/ensemble/tests/test_forest_spmd.py +25 -8
- sklearnex/spmd/linear_model/tests/test_incremental_linear_spmd.py +6 -2
- sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py +12 -3
- sklearnex/spmd/linear_model/tests/test_logistic_regression_spmd.py +12 -5
- sklearnex/spmd/neighbors/__init__.py +2 -2
- sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py +27 -5
- sklearnex/svm/_common.py +15 -28
- sklearnex/svm/nusvc.py +36 -129
- sklearnex/svm/nusvr.py +10 -22
- sklearnex/svm/svc.py +34 -127
- sklearnex/svm/svr.py +10 -22
- sklearnex/tests/test_common.py +51 -11
- sklearnex/tests/test_config.py +62 -0
- sklearnex/tests/test_memory_usage.py +18 -24
- sklearnex/tests/test_monkeypatch.py +4 -4
- sklearnex/tests/test_patching.py +89 -60
- sklearnex/tests/test_run_to_run_stability.py +7 -0
- sklearnex/tests/utils/base.py +2 -2
- sklearnex/utils/validation.py +8 -22
- daal4py/doc/third-party-programs.txt +0 -424
- onedal/common/_base.py +0 -38
- onedal/common/_policy.py +0 -55
- onedal/common/_spmd_policy.py +0 -30
- onedal/common/tests/test_policy.py +0 -76
- onedal/spmd/_base.py +0 -30
- onedal/utils/__init__.py +0 -49
- scikit_learn_intelex-2025.4.0.dist-info/RECORD +0 -282
- sklearnex/spmd/neighbors/neighbors.py +0 -25
- {scikit_learn_intelex-2025.4.0.dist-info → scikit_learn_intelex-2025.6.0.dist-info}/LICENSE.txt +0 -0
- {scikit_learn_intelex-2025.4.0.dist-info → scikit_learn_intelex-2025.6.0.dist-info}/WHEEL +0 -0
- {scikit_learn_intelex-2025.4.0.dist-info → scikit_learn_intelex-2025.6.0.dist-info}/top_level.txt +0 -0
daal4py/__main__.py
CHANGED
|
@@ -27,7 +27,7 @@ def _main():
|
|
|
27
27
|
description="""
|
|
28
28
|
Run your Python script with Intel(R) Distribution for
|
|
29
29
|
Python* patches of scikit-learn, optimizing solvers of
|
|
30
|
-
scikit-learn with
|
|
30
|
+
scikit-learn with oneAPI Data Analytics Library.
|
|
31
31
|
""",
|
|
32
32
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
33
33
|
)
|
|
Binary file
|
daal4py/mb/__init__.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2023 Intel Corporation
|
|
1
|
+
# Copyright contributors to the oneDAL project
|
|
3
2
|
#
|
|
4
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -12,8 +11,73 @@
|
|
|
12
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
12
|
# See the License for the specific language governing permissions and
|
|
14
13
|
# limitations under the License.
|
|
15
|
-
# ==============================================================================
|
|
16
14
|
|
|
17
|
-
from .
|
|
15
|
+
from sklearn.linear_model import LogisticRegression, SGDClassifier
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
from .logistic_regression_builders import LogisticDAALModel
|
|
18
|
+
from .tree_based_builders import GBTDAALBaseModel, GBTDAALModel
|
|
19
|
+
|
|
20
|
+
__all__ = ["LogisticDAALModel", "GBTDAALModel", "convert_model"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def convert_model(model) -> "GBTDAALModel | LogisticDAALModel":
|
|
24
|
+
"""
|
|
25
|
+
Convert GBT or LogReg models to Daal4Py
|
|
26
|
+
|
|
27
|
+
This function can be used to convert machine learning models / estimators
|
|
28
|
+
created through other libraries to daal4py classes which offer accelerated
|
|
29
|
+
prediction methods.
|
|
30
|
+
|
|
31
|
+
It supports gradient-boosted decision tree ensembles (GBT) from the libraries
|
|
32
|
+
``xgboost``, ``lightgbm``, and ``catboost``; and logistic regression (binary
|
|
33
|
+
and multinomial) models from scikit-learn.
|
|
34
|
+
|
|
35
|
+
See the documentation of the classes :obj:`daal4py.mb.GBTDAALModel` and
|
|
36
|
+
:obj:`daal4py.mb.LogisticDAALModel` for more details.
|
|
37
|
+
|
|
38
|
+
As an alternative to this function, models of a specific type (GBT or LogReg)
|
|
39
|
+
can also be instantiated by calling those classes directly - for example,
|
|
40
|
+
logistic regression models can be instantiated directly from fitted coefficients
|
|
41
|
+
and intercepts, thereby allowing to work with models from libraries beyond
|
|
42
|
+
scikit-learn.
|
|
43
|
+
|
|
44
|
+
Parameters
|
|
45
|
+
----------
|
|
46
|
+
model : fitted model object
|
|
47
|
+
A fitted model object (either GBT or LogReg) from the supported libraries.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
obj : GBTDAALModel or LogisticDAALModel
|
|
52
|
+
A daal4py model object of the corresponding class for the model type, which
|
|
53
|
+
offers faster prediction methods.
|
|
54
|
+
"""
|
|
55
|
+
if isinstance(model, LogisticRegression):
|
|
56
|
+
if model.classes_.shape[0] > 2:
|
|
57
|
+
if (model.multi_class == "ovr") or (
|
|
58
|
+
model.multi_class == "auto" and model.solver == "liblinear"
|
|
59
|
+
):
|
|
60
|
+
raise TypeError(
|
|
61
|
+
"Supplied 'model' object is a linear classifier, but not multinomial logistic"
|
|
62
|
+
" (hint: pass multi_class='multinomial' to 'LogisticRegression')."
|
|
63
|
+
)
|
|
64
|
+
elif (model.classes_.shape[0] == 2) and (model.multi_class == "multinomial"):
|
|
65
|
+
raise TypeError(
|
|
66
|
+
"Supplied 'model' object is not a logistic regressor "
|
|
67
|
+
"(hint: pass multi_class='auto' to 'LogisticRegression')."
|
|
68
|
+
)
|
|
69
|
+
return LogisticDAALModel(model.coef_, model.intercept_)
|
|
70
|
+
if isinstance(model, SGDClassifier):
|
|
71
|
+
if model.classes_.shape[0] > 2:
|
|
72
|
+
raise TypeError(
|
|
73
|
+
"Supplied 'model' object is a linear classifier, but not multinomial logistic"
|
|
74
|
+
" (note: scikit-learn does not offer stochastic multinomial logistic models)."
|
|
75
|
+
)
|
|
76
|
+
if model.loss != "log_loss":
|
|
77
|
+
raise TypeError(
|
|
78
|
+
"Supplied 'model' object is not a logistic regressor "
|
|
79
|
+
"(hint: pass loss='log_loss' to 'SGDClassifier')."
|
|
80
|
+
)
|
|
81
|
+
return LogisticDAALModel(model.coef_, model.intercept_)
|
|
82
|
+
|
|
83
|
+
return GBTDAALModel(model)
|