Skip to content

Commit d22aaf6

Browse files
authored
[ENH] rename capability:online tag to capability:update (#479)
This PR renames the `capability:online` tag to `capability:update`. This is more in line with tags that describe whether methods are present, most being called `capability:methodname`. No deprecation is necessary, as the online update API has not been released yet.
1 parent 109aa4b commit d22aaf6

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

skpro/registry/_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"whether estimator supports missing values",
124124
),
125125
(
126-
"capability:online",
126+
"capability:update",
127127
"regressor_proba",
128128
"bool",
129129
"whether estimator supports online updates via update",

skpro/regression/base/_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BaseProbaRegressor(BaseEstimator):
3333
"capability:survival": False,
3434
"capability:multioutput": False,
3535
"capability:missing": True,
36-
"capability:online": False,
36+
"capability:update": False,
3737
"X_inner_mtype": "pd_DataFrame_Table",
3838
"y_inner_mtype": "pd_DataFrame_Table",
3939
"C_inner_mtype": "pd_DataFrame_Table",
@@ -140,7 +140,7 @@ def _fit(self, X, y, C=None):
140140
def update(self, X, y, C=None):
141141
"""Update regressor with a new batch of training data.
142142
143-
Only estimators with the ``capability:online`` tag (value ``True``)
143+
Only estimators with the ``capability:update`` tag (value ``True``)
144144
provide this method, otherwise the method ignores the call and
145145
discards the data passed.
146146
@@ -164,7 +164,7 @@ def update(self, X, y, C=None):
164164
-------
165165
self : reference to self
166166
"""
167-
capa_online = self.get_tag("capability:online")
167+
capa_online = self.get_tag("capability:update")
168168
capa_surv = self.get_tag("capability:survival")
169169

170170
if not capa_online:

skpro/regression/compose/_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def __init__(self, steps):
339339
tags_to_clone = [
340340
"capability:multioutput",
341341
"capability:survival",
342-
"capability:online",
342+
"capability:update",
343343
]
344344
self.clone_tags(self.regressor_, tags_to_clone)
345345

skpro/regression/online/_dont_refit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class OnlineDontRefit(_DelegatedProbaRegressor):
2626
clone of the regressor passed in the constructor, fitted on all data
2727
"""
2828

29-
_tags = {"capability:online": False}
29+
_tags = {"capability:update": False}
3030

3131
def __init__(self, estimator):
3232
self.estimator = estimator

skpro/regression/online/_refit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class OnlineRefit(_DelegatedProbaRegressor):
2828
clone of the regressor passed in the constructor, fitted on all data
2929
"""
3030

31-
_tags = {"capability:online": True}
31+
_tags = {"capability:update": True}
3232

3333
def __init__(self, estimator):
3434
self.estimator = estimator

skpro/regression/online/_refit_every.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class OnlineRefitEveryN(_DelegatedProbaRegressor):
3333
clone of the regressor passed in the constructor, fitted on all data
3434
"""
3535

36-
_tags = {"capability:online": True}
36+
_tags = {"capability:update": True}
3737

3838
def __init__(self, estimator, N=1):
3939
self.estimator = estimator

skpro/survival/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def fit(self, X, y, C=None):
5151
def update(self, X, y, C=None):
5252
"""Update regressor with a new batch of training data.
5353
54-
Only estimators with the ``capability:online`` tag (value ``True``)
54+
Only estimators with the ``capability:update`` tag (value ``True``)
5555
provide this method, otherwise the method ignores the call and
5656
discards the data passed.
5757

0 commit comments

Comments
 (0)