Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions python/cuml/cuml/metrics/_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import warnings

import cudf
import cupy as cp
import numpy as np
Expand Down Expand Up @@ -59,9 +57,7 @@ def _input_to_cupy_or_cudf_series(x, check_rows=None):


@cuml.internals.api_return_any()
def accuracy_score(
y_true, y_pred, *, sample_weight=None, normalize=True, **kwargs
):
def accuracy_score(y_true, y_pred, *, sample_weight=None, normalize=True):
"""
Accuracy classification score.

Expand All @@ -84,13 +80,6 @@ def accuracy_score(
classified samples if ``normalize == False``.
"""

if kwargs:
warnings.warn(
"`convert_dtype` and `handle` were deprecated from `accuracy_score` "
"in version 25.04 and will be removed in 25.06.",
FutureWarning,
)

y_true = _input_to_cupy_or_cudf_series(y_true)
y_pred = _input_to_cupy_or_cudf_series(y_pred, check_rows=len(y_true))

Expand Down
10 changes: 0 additions & 10 deletions python/cuml/cuml/metrics/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# limitations under the License.
#

import warnings

import cupy as cp
import numpy as np

Expand Down Expand Up @@ -84,7 +82,6 @@ def r2_score(
sample_weight=None,
multioutput="uniform_average",
force_finite=True,
**kwargs,
):
""":math:`R^2` (coefficient of determination) regression score function.

Expand Down Expand Up @@ -122,13 +119,6 @@ def r2_score(
The :math:`R^2` score or ndarray of scores if 'multioutput' is
'raw_values'.
"""
if kwargs:
warnings.warn(
"`convert_dtype` and `handle` were deprecated from `r2_score` in version "
"25.02.01 and will be removed in 25.06.",
FutureWarning,
)

(
y_true,
y_pred,
Expand Down
27 changes: 2 additions & 25 deletions python/cuml/cuml/svm/svc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import numpy as np
from cython.operator cimport dereference as deref
from libc.stdint cimport uintptr_t

import warnings

import cuml.internals
from cuml.common.array_descriptor import CumlArrayDescriptor
from cuml.common.doc_utils import generate_docstring
Expand Down Expand Up @@ -335,9 +333,6 @@ class SVC(SVMBase,
<https://scikit-learn.org/stable/modules/generated/sklearn.multiclass.OneVsOneClassifier.html>`_
while ``'ovr'`` selects `OneVsRestClassifier
<https://scikit-learn.org/stable/modules/generated/sklearn.multiclass.OneVsRestClassifier.html>`_

.. versionadded:: 25.02
The parameter `multiclass_strategy` was renamed to `decision_function_shape`.
nochange_steps : int (default = 1000)
We monitor how much our stopping criteria changes during outer
iterations. If it does not change (changes less then 1e-3*tol)
Expand All @@ -357,14 +352,6 @@ class SVC(SVMBase,
verbose : int or boolean, default=False
Sets logging level. It must be one of `cuml.common.logger.level_*`.
See :ref:`verbosity-levels` for more info.
multiclass_strategy
Multiclass classification strategy. ``'ovo'`` uses `OneVsOneClassifier
<https://scikit-learn.org/stable/modules/generated/sklearn.multiclass.OneVsOneClassifier.html>`_
while ``'ovr'`` selects `OneVsRestClassifier
<https://scikit-learn.org/stable/modules/generated/sklearn.multiclass.OneVsRestClassifier.html>`_

.. versionchanged:: 25.02
Renamed to `decision_function_shape`. Will be removed in later versions.

Attributes
----------
Expand Down Expand Up @@ -421,8 +408,7 @@ class SVC(SVMBase,
gamma='scale', coef0=0.0, tol=1e-3, cache_size=1024.0,
max_iter=-1, nochange_steps=1000, verbose=False,
output_type=None, probability=False, random_state=None,
class_weight=None, decision_function_shape='ovo',
multiclass_strategy="warn"):
class_weight=None, decision_function_shape='ovo'):
super().__init__(
handle=handle,
C=C,
Expand All @@ -445,7 +431,6 @@ class SVC(SVMBase,
self.svmType = C_SVC

self.decision_function_shape = decision_function_shape
self.multiclass_strategy = multiclass_strategy

@property
@cuml.internals.api_base_return_array_skipall
Expand Down Expand Up @@ -592,14 +577,6 @@ class SVC(SVMBase,
Fit the model with X and y.

"""
if self.multiclass_strategy != "warn":
self.decision_function_shape = self.multiclass_strategy
warnings.warn(
"`multiclass_strategy` was deprecated in 25.04 and will be "
"removed in 25.06. Please use `decision_function_shape` instead",
FutureWarning
)

self.n_classes_ = self._get_num_classes(y)

# we need to check whether input X is sparse
Expand Down Expand Up @@ -823,7 +800,7 @@ class SVC(SVMBase,
@classmethod
def _get_param_names(cls):
params = super()._get_param_names() + \
["probability", "random_state", "class_weight", "decision_function_shape", "multiclass_strategy"]
["probability", "random_state", "class_weight", "decision_function_shape"]

# Ignore "epsilon" since its not used in the constructor
if ("epsilon" in params):
Expand Down