scikit-learn-intelex 2025.7.0__py310-none-manylinux_2_28_x86_64.whl → 2025.9.0__py310-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/_daal4py.cpython-310-x86_64-linux-gnu.so +0 -0
- daal4py/mb/__init__.py +19 -8
- daal4py/mb/logistic_regression_builders.py +17 -23
- daal4py/mpi_transceiver.cpython-310-x86_64-linux-gnu.so +0 -0
- daal4py/sklearn/linear_model/logistic_loss.py +4 -4
- daal4py/sklearn/linear_model/logistic_path.py +170 -664
- daal4py/sklearn/monkeypatch/tests/_models_info.py +5 -2
- daal4py/sklearn/utils/validation.py +2 -2
- onedal/_device_offload.py +41 -40
- onedal/_onedal_py_dpc.cpython-310-x86_64-linux-gnu.so +0 -0
- onedal/_onedal_py_host.cpython-310-x86_64-linux-gnu.so +0 -0
- onedal/_onedal_py_spmd_dpc.cpython-310-x86_64-linux-gnu.so +0 -0
- onedal/basic_statistics/basic_statistics.py +52 -76
- onedal/basic_statistics/incremental_basic_statistics.py +26 -41
- onedal/basic_statistics/tests/test_basic_statistics.py +6 -7
- onedal/basic_statistics/tests/test_incremental_basic_statistics.py +11 -11
- onedal/cluster/dbscan.py +7 -25
- onedal/cluster/kmeans.py +1 -1
- onedal/common/hyperparameters.py +31 -11
- onedal/common/tests/test_sycl.py +5 -0
- onedal/covariance/covariance.py +7 -16
- onedal/covariance/incremental_covariance.py +13 -18
- onedal/covariance/tests/test_covariance.py +3 -3
- onedal/datatypes/__init__.py +6 -3
- onedal/datatypes/_data_conversion.py +97 -49
- onedal/datatypes/_dlpack.py +64 -0
- onedal/datatypes/_sycl_usm.py +9 -24
- onedal/datatypes/tests/test_data.py +85 -18
- onedal/decomposition/incremental_pca.py +39 -40
- onedal/decomposition/pca.py +49 -125
- onedal/decomposition/tests/test_incremental_pca.py +11 -5
- onedal/ensemble/forest.py +5 -5
- onedal/linear_model/incremental_linear_model.py +48 -160
- onedal/linear_model/linear_model.py +75 -188
- onedal/linear_model/logistic_regression.py +25 -11
- onedal/linear_model/tests/test_linear_regression.py +10 -17
- onedal/neighbors/neighbors.py +5 -4
- onedal/spmd/ensemble/forest.py +18 -0
- onedal/spmd/neighbors/__init__.py +2 -2
- onedal/spmd/neighbors/neighbors.py +30 -0
- onedal/tests/test_common.py +14 -0
- onedal/utils/_array_api.py +3 -0
- onedal/utils/_sycl_queue_manager.py +51 -25
- onedal/utils/_third_party.py +52 -2
- {scikit_learn_intelex-2025.7.0.dist-info → scikit_learn_intelex-2025.9.0.dist-info}/METADATA +84 -91
- {scikit_learn_intelex-2025.7.0.dist-info → scikit_learn_intelex-2025.9.0.dist-info}/RECORD +105 -104
- sklearnex/__init__.py +2 -1
- sklearnex/_config.py +0 -5
- sklearnex/_device_offload.py +13 -12
- sklearnex/_utils.py +31 -4
- sklearnex/basic_statistics/basic_statistics.py +26 -37
- sklearnex/basic_statistics/incremental_basic_statistics.py +33 -42
- sklearnex/cluster/dbscan.py +30 -27
- sklearnex/cluster/k_means.py +1 -0
- sklearnex/covariance/incremental_covariance.py +139 -98
- sklearnex/covariance/tests/test_incremental_covariance.py +30 -0
- sklearnex/decomposition/pca.py +356 -221
- sklearnex/decomposition/tests/test_pca.py +102 -53
- sklearnex/dispatcher.py +1 -6
- sklearnex/ensemble/_forest.py +8 -2
- sklearnex/ensemble/tests/test_forest.py +22 -7
- sklearnex/linear_model/coordinate_descent.py +2 -0
- sklearnex/linear_model/incremental_linear.py +76 -68
- sklearnex/linear_model/incremental_ridge.py +69 -53
- sklearnex/linear_model/linear.py +53 -41
- sklearnex/linear_model/logistic_regression.py +122 -38
- sklearnex/linear_model/ridge.py +42 -31
- sklearnex/linear_model/tests/test_linear.py +27 -61
- sklearnex/linear_model/tests/test_logreg.py +437 -6
- sklearnex/neighbors/common.py +8 -6
- sklearnex/preview/covariance/covariance.py +159 -28
- sklearnex/preview/covariance/tests/test_covariance.py +43 -50
- sklearnex/preview/decomposition/incremental_pca.py +251 -72
- sklearnex/preview/decomposition/tests/test_incremental_pca.py +55 -1
- sklearnex/spmd/basic_statistics/basic_statistics.py +7 -4
- sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py +6 -3
- sklearnex/spmd/basic_statistics/tests/test_incremental_basic_statistics_spmd.py +12 -8
- sklearnex/spmd/cluster/dbscan.py +2 -26
- sklearnex/spmd/covariance/covariance.py +7 -4
- sklearnex/spmd/covariance/tests/test_covariance_spmd.py +18 -8
- sklearnex/spmd/covariance/tests/test_incremental_covariance_spmd.py +7 -2
- sklearnex/spmd/decomposition/pca.py +6 -4
- sklearnex/spmd/decomposition/tests/test_incremental_pca_spmd.py +2 -2
- sklearnex/spmd/decomposition/tests/test_pca_spmd.py +19 -6
- sklearnex/spmd/ensemble/forest.py +230 -2
- sklearnex/spmd/ensemble/tests/test_forest_spmd.py +21 -4
- sklearnex/spmd/linear_model/linear_model.py +7 -4
- sklearnex/spmd/linear_model/tests/test_incremental_linear_spmd.py +16 -8
- sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py +12 -4
- sklearnex/spmd/neighbors/__init__.py +6 -2
- sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py +136 -13
- sklearnex/svm/_common.py +71 -8
- sklearnex/svm/tests/test_svm.py +31 -0
- sklearnex/tests/test_common.py +0 -1
- sklearnex/tests/test_config.py +55 -6
- sklearnex/tests/test_hyperparameters.py +85 -17
- sklearnex/tests/test_memory_usage.py +1 -1
- sklearnex/tests/test_patching.py +18 -14
- sklearnex/tests/utils/base.py +3 -21
- sklearnex/utils/_array_api.py +136 -1
- sklearnex/utils/parallel.py +68 -30
- sklearnex/utils/validation.py +19 -1
- {scikit_learn_intelex-2025.7.0.dist-info → scikit_learn_intelex-2025.9.0.dist-info}/LICENSE.txt +0 -0
- {scikit_learn_intelex-2025.7.0.dist-info → scikit_learn_intelex-2025.9.0.dist-info}/WHEEL +0 -0
- {scikit_learn_intelex-2025.7.0.dist-info → scikit_learn_intelex-2025.9.0.dist-info}/top_level.txt +0 -0
|
Binary file
|
daal4py/mb/__init__.py
CHANGED
|
@@ -53,15 +53,26 @@ def convert_model(model) -> "GBTDAALModel | LogisticDAALModel":
|
|
|
53
53
|
offers faster prediction methods.
|
|
54
54
|
"""
|
|
55
55
|
if isinstance(model, LogisticRegression):
|
|
56
|
+
# The multi_class keyword is removed in scikit-learn 1.8, and OvR functionality
|
|
57
|
+
# has been replaced by other estimators. Therefore checking for linear classifiers
|
|
58
|
+
# only dependent on the solver.
|
|
56
59
|
if model.classes_.shape[0] > 2:
|
|
57
|
-
if (model
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
64
|
-
|
|
60
|
+
if not hasattr(model, "multi_class"):
|
|
61
|
+
if model.solver == "liblinear":
|
|
62
|
+
raise TypeError(
|
|
63
|
+
"Supplied 'model' object is a linear classifier, but not multinomial logistic"
|
|
64
|
+
)
|
|
65
|
+
else:
|
|
66
|
+
if (model.multi_class == "ovr") or (
|
|
67
|
+
model.multi_class == "auto" and model.solver == "liblinear"
|
|
68
|
+
):
|
|
69
|
+
raise TypeError(
|
|
70
|
+
"Supplied 'model' object is a linear classifier, but not multinomial logistic"
|
|
71
|
+
" (hint: pass multi_class='multinomial' to 'LogisticRegression')."
|
|
72
|
+
)
|
|
73
|
+
elif (model.classes_.shape[0] == 2) and (
|
|
74
|
+
getattr(model, "multi_class", "auto") == "multinomial"
|
|
75
|
+
):
|
|
65
76
|
raise TypeError(
|
|
66
77
|
"Supplied 'model' object is not a logistic regressor "
|
|
67
78
|
"(hint: pass multi_class='auto' to 'LogisticRegression')."
|
|
@@ -97,21 +97,6 @@ class LogisticDAALModel:
|
|
|
97
97
|
)
|
|
98
98
|
builder.set_beta(coefs, intercepts)
|
|
99
99
|
self._model = builder.model
|
|
100
|
-
self._alg_pred_class = logistic_regression_prediction(
|
|
101
|
-
nClasses=self.n_classes_,
|
|
102
|
-
fptype=self._fptype,
|
|
103
|
-
resultsToEvaluate="computeClassLabels",
|
|
104
|
-
)
|
|
105
|
-
self._alg_pred_prob = logistic_regression_prediction(
|
|
106
|
-
nClasses=self.n_classes_,
|
|
107
|
-
fptype=self._fptype,
|
|
108
|
-
resultsToEvaluate="computeClassProbabilities",
|
|
109
|
-
)
|
|
110
|
-
self._alg_pred_logprob = logistic_regression_prediction(
|
|
111
|
-
nClasses=self.n_classes_,
|
|
112
|
-
fptype=self._fptype,
|
|
113
|
-
resultsToEvaluate="computeClassLogProbabilities",
|
|
114
|
-
)
|
|
115
100
|
|
|
116
101
|
@property
|
|
117
102
|
def coef_(self):
|
|
@@ -121,6 +106,15 @@ class LogisticDAALModel:
|
|
|
121
106
|
def intercept_(self):
|
|
122
107
|
return self._model.Beta[:, 0]
|
|
123
108
|
|
|
109
|
+
def _logistic_regression_prediction(
|
|
110
|
+
self, X: np.ndarray, resultsToEvaluate: str
|
|
111
|
+
) -> classifier_prediction_result:
|
|
112
|
+
return logistic_regression_prediction(
|
|
113
|
+
nClasses=self.n_classes_,
|
|
114
|
+
fptype=self._fptype,
|
|
115
|
+
resultsToEvaluate=resultsToEvaluate,
|
|
116
|
+
).compute(X, self._model)
|
|
117
|
+
|
|
124
118
|
def predict(self, X) -> np.ndarray:
|
|
125
119
|
"""
|
|
126
120
|
Predict most probable class
|
|
@@ -133,7 +127,7 @@ class LogisticDAALModel:
|
|
|
133
127
|
The most probable class, as integer indexes
|
|
134
128
|
"""
|
|
135
129
|
return (
|
|
136
|
-
self.
|
|
130
|
+
self._logistic_regression_prediction(X, "computeClassLabels")
|
|
137
131
|
.prediction.reshape(-1)
|
|
138
132
|
.astype(int)
|
|
139
133
|
)
|
|
@@ -151,7 +145,9 @@ class LogisticDAALModel:
|
|
|
151
145
|
proba : array(n_samples, n_classes)
|
|
152
146
|
The predicted probabilities for each class.
|
|
153
147
|
"""
|
|
154
|
-
return self.
|
|
148
|
+
return self._logistic_regression_prediction(
|
|
149
|
+
X, "computeClassProbabilities"
|
|
150
|
+
).probabilities
|
|
155
151
|
|
|
156
152
|
predict_proba.__doc__ = predict_proba.__doc__.replace(r"%docstring_X%", _docstring_X)
|
|
157
153
|
|
|
@@ -166,7 +162,9 @@ class LogisticDAALModel:
|
|
|
166
162
|
log_proba : array(n_samples, n_classes)
|
|
167
163
|
The logarithms of the predicted probabilities for each class.
|
|
168
164
|
"""
|
|
169
|
-
return self.
|
|
165
|
+
return self._logistic_regression_prediction(
|
|
166
|
+
X, "computeClassLogProbabilities"
|
|
167
|
+
).logProbabilities
|
|
170
168
|
|
|
171
169
|
predict_log_proba.__doc__ = predict_log_proba.__doc__.replace(
|
|
172
170
|
r"%docstring_X%", _docstring_X
|
|
@@ -206,11 +204,7 @@ class LogisticDAALModel:
|
|
|
206
204
|
raise ValueError(
|
|
207
205
|
"Must request at least one of 'classes', 'proba', 'log_proba'."
|
|
208
206
|
)
|
|
209
|
-
return
|
|
210
|
-
nClasses=self.n_classes_,
|
|
211
|
-
fptype=self._fptype,
|
|
212
|
-
resultsToEvaluate=pred_request,
|
|
213
|
-
).compute(X, self._model)
|
|
207
|
+
return self._logistic_regression_prediction(X, pred_request)
|
|
214
208
|
|
|
215
209
|
predict_multiple.__doc__ = predict_multiple.__doc__.replace(
|
|
216
210
|
r"%docstring_X%", _docstring_X
|
|
Binary file
|
|
@@ -61,8 +61,8 @@ def _daal4py_logistic_loss_extra_args(
|
|
|
61
61
|
fptype=getFPType(X),
|
|
62
62
|
method="defaultDense",
|
|
63
63
|
interceptFlag=fit_intercept,
|
|
64
|
-
penaltyL1=l1
|
|
65
|
-
penaltyL2=l2
|
|
64
|
+
penaltyL1=l1,
|
|
65
|
+
penaltyL2=l2,
|
|
66
66
|
resultsToCompute=results_to_compute,
|
|
67
67
|
)
|
|
68
68
|
objective_function_algorithm_instance.setup(X, y, beta)
|
|
@@ -99,8 +99,8 @@ def _daal4py_cross_entropy_loss_extra_args(
|
|
|
99
99
|
fptype=getFPType(X),
|
|
100
100
|
method="defaultDense",
|
|
101
101
|
interceptFlag=fit_intercept,
|
|
102
|
-
penaltyL1=l1
|
|
103
|
-
penaltyL2=l2
|
|
102
|
+
penaltyL1=l1,
|
|
103
|
+
penaltyL2=l2,
|
|
104
104
|
resultsToCompute=results_to_compute,
|
|
105
105
|
)
|
|
106
106
|
)
|