Skip to content

Commit 19fd721

Browse files
add incremental ridge to nonsklearn docs (#2300)
1 parent e4b916f commit 19fd721

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

doc/sources/non-scikit-algorithms.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,11 @@ IncrementalLinearRegression
3939
.. autoclass:: sklearnex.linear_model.IncrementalLinearRegression
4040
.. automethod:: sklearnex.linear_model.IncrementalLinearRegression.fit
4141
.. automethod:: sklearnex.linear_model.IncrementalLinearRegression.partial_fit
42-
.. automethod:: sklearnex.linear_model.IncrementalLinearRegression.predict
42+
.. automethod:: sklearnex.linear_model.IncrementalLinearRegression.predict
43+
44+
IncrementalRidge
45+
----------------
46+
.. autoclass:: sklearnex.linear_model.IncrementalRidge
47+
.. automethod:: sklearnex.linear_model.IncrementalRidge.fit
48+
.. automethod:: sklearnex.linear_model.IncrementalRidge.partial_fit
49+
.. automethod:: sklearnex.linear_model.IncrementalRidge.predict

sklearnex/linear_model/incremental_ridge.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from onedal.linear_model import IncrementalRidge as onedal_IncrementalRidge
3333

3434
from .._device_offload import dispatch, wrap_output_data
35-
from .._utils import PatchingConditionsChain
35+
from .._utils import IntelEstimator, PatchingConditionsChain
3636

3737
if sklearn_check_version("1.6"):
3838
from sklearn.utils.validation import validate_data
@@ -43,22 +43,22 @@
4343
@control_n_jobs(
4444
decorated_methods=["fit", "partial_fit", "predict", "score", "_onedal_finalize_fit"]
4545
)
46-
class IncrementalRidge(MultiOutputMixin, RegressorMixin, BaseEstimator):
46+
class IncrementalRidge(IntelEstimator, MultiOutputMixin, RegressorMixin, BaseEstimator):
4747
"""
4848
Incremental estimator for Ridge Regression.
4949
Allows to train Ridge Regression if data is splitted into batches.
5050
5151
Parameters
5252
----------
5353
fit_intercept : bool, default=True
54-
Whether to calculate the intercept for this model. If set
55-
to False, no intercept will be used in calculations
56-
(i.e. data is expected to be centered).
54+
Whether to calculate the intercept for this model. If set
55+
to False, no intercept will be used in calculations
56+
(i.e. data is expected to be centered).
5757
5858
alpha : float, default=1.0
59-
Regularization strength; must be a positive float. Regularization
60-
improves the conditioning of the problem and reduces the variance of
61-
the estimates. Larger values specify stronger regularization.
59+
Regularization strength; must be a positive float. Regularization
60+
improves the conditioning of the problem and reduces the variance of
61+
the estimates. Larger values specify stronger regularization.
6262
6363
copy_X : bool, default=True
6464
If True, X will be copied; else, it may be overwritten.

0 commit comments

Comments
 (0)