From 99e8a68e585047e11c5de64f1610841607af3195 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 13 Oct 2024 20:59:56 -0500 Subject: [PATCH] MAINT fix reference to sample_weight meta-issue in comments --- sklearn/cluster/_kmeans.py | 2 +- sklearn/ensemble/_bagging.py | 2 +- sklearn/ensemble/_forest.py | 6 +++--- sklearn/ensemble/_gb.py | 4 ++-- .../_hist_gradient_boosting/gradient_boosting.py | 2 +- sklearn/ensemble/_iforest.py | 2 +- sklearn/ensemble/_weight_boosting.py | 4 ++-- sklearn/linear_model/_base.py | 2 +- sklearn/linear_model/_bayes.py | 2 +- sklearn/linear_model/_perceptron.py | 2 +- sklearn/linear_model/_ransac.py | 2 +- sklearn/linear_model/_stochastic_gradient.py | 6 +++--- sklearn/naive_bayes.py | 2 +- sklearn/preprocessing/_discretization.py | 2 +- sklearn/svm/_classes.py | 14 +++++++------- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/sklearn/cluster/_kmeans.py b/sklearn/cluster/_kmeans.py index fbe35d0ff2c76..18f5cd244c121 100644 --- a/sklearn/cluster/_kmeans.py +++ b/sklearn/cluster/_kmeans.py @@ -1179,7 +1179,7 @@ def score(self, X, y=None, sample_weight=None): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/ensemble/_bagging.py b/sklearn/ensemble/_bagging.py index 256c420da8e7c..423fc0ec6449a 100644 --- a/sklearn/ensemble/_bagging.py +++ b/sklearn/ensemble/_bagging.py @@ -643,7 +643,7 @@ def _get_estimator(self): def __sklearn_tags__(self): tags = super().__sklearn_tags__() tags.input_tags.allow_nan = get_tags(self._get_estimator()).input_tags.allow_nan - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/ensemble/_forest.py b/sklearn/ensemble/_forest.py index a742a0dce3a33..7c7663864ad92 100644 --- a/sklearn/ensemble/_forest.py +++ b/sklearn/ensemble/_forest.py @@ -1560,7 +1560,7 @@ def __init__( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -1931,7 +1931,7 @@ def __init__( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -3016,7 +3016,7 @@ def transform(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/ensemble/_gb.py b/sklearn/ensemble/_gb.py index d4cd2dfa08f96..8f85f2f7aa3cd 100644 --- a/sklearn/ensemble/_gb.py +++ b/sklearn/ensemble/_gb.py @@ -1727,7 +1727,7 @@ def staged_predict_proba(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: investigate failure see meta-issue #162298 + # TODO: investigate failure see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -2194,7 +2194,7 @@ def apply(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: investigate failure see meta-issue #162298 + # TODO: investigate failure see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py index 8695d4cc529fc..b136cd373a03f 100644 --- a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py +++ b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py @@ -1389,7 +1389,7 @@ def _compute_partial_dependence_recursion(self, grid, target_features): def __sklearn_tags__(self): tags = super().__sklearn_tags__() tags.input_tags.allow_nan = True - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/ensemble/_iforest.py b/sklearn/ensemble/_iforest.py index 1a4e865a4af11..89ae067a43dbb 100644 --- a/sklearn/ensemble/_iforest.py +++ b/sklearn/ensemble/_iforest.py @@ -633,7 +633,7 @@ def _compute_score_samples(self, X, subsample_features): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/ensemble/_weight_boosting.py b/sklearn/ensemble/_weight_boosting.py index c7c8c3e6705d3..7780230b046cb 100644 --- a/sklearn/ensemble/_weight_boosting.py +++ b/sklearn/ensemble/_weight_boosting.py @@ -860,7 +860,7 @@ def predict_log_proba(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -1179,7 +1179,7 @@ def staged_predict(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/linear_model/_base.py b/sklearn/linear_model/_base.py index 4cdb03b836e30..6f86387a1c355 100644 --- a/sklearn/linear_model/_base.py +++ b/sklearn/linear_model/_base.py @@ -683,7 +683,7 @@ def rmatvec(b): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: investigate failure see meta-issue #162298 + # TODO: investigate failure see meta-issue #16298 # # Note: this model should converge to the minimum norm solution of the # least squares problem and as result be numerically stable enough when diff --git a/sklearn/linear_model/_bayes.py b/sklearn/linear_model/_bayes.py index 07031a264cf03..555b4ec13df69 100644 --- a/sklearn/linear_model/_bayes.py +++ b/sklearn/linear_model/_bayes.py @@ -432,7 +432,7 @@ def _log_marginal_likelihood( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: fix sample_weight handling of this estimator, see meta-issue #162298 + # TODO: fix sample_weight handling of this estimator, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/linear_model/_perceptron.py b/sklearn/linear_model/_perceptron.py index a9418dbf55bd2..f656b44c0c676 100644 --- a/sklearn/linear_model/_perceptron.py +++ b/sklearn/linear_model/_perceptron.py @@ -227,7 +227,7 @@ def __init__( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/linear_model/_ransac.py b/sklearn/linear_model/_ransac.py index bf53b726c5903..8b5b34317f5eb 100644 --- a/sklearn/linear_model/_ransac.py +++ b/sklearn/linear_model/_ransac.py @@ -723,7 +723,7 @@ def get_metadata_routing(self): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/linear_model/_stochastic_gradient.py b/sklearn/linear_model/_stochastic_gradient.py index fbbf44e836b69..a9c14f907dfca 100644 --- a/sklearn/linear_model/_stochastic_gradient.py +++ b/sklearn/linear_model/_stochastic_gradient.py @@ -1376,7 +1376,7 @@ def predict_log_proba(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -2061,7 +2061,7 @@ def __init__( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -2642,7 +2642,7 @@ def predict(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/naive_bayes.py b/sklearn/naive_bayes.py index 2fe127ea5b939..fa99448f9d347 100644 --- a/sklearn/naive_bayes.py +++ b/sklearn/naive_bayes.py @@ -1433,7 +1433,7 @@ def partial_fit(self, X, y, classes=None, sample_weight=None): def __sklearn_tags__(self): tags = super().__sklearn_tags__() tags.input_tags.positive_only = True - # TODO: fix sample_weight handling of this estimator, see meta-issue #162298 + # TODO: fix sample_weight handling of this estimator, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/preprocessing/_discretization.py b/sklearn/preprocessing/_discretization.py index 7e2c4b6eb6e3e..8b5dea5c4f6c3 100644 --- a/sklearn/preprocessing/_discretization.py +++ b/sklearn/preprocessing/_discretization.py @@ -465,7 +465,7 @@ def get_feature_names_out(self, input_features=None): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: fix sample_weight handling of this estimator, see meta-issue #162298 + # TODO: fix sample_weight handling of this estimator, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." diff --git a/sklearn/svm/_classes.py b/sklearn/svm/_classes.py index 7f4a63a4dc5a7..ae7a816251340 100644 --- a/sklearn/svm/_classes.py +++ b/sklearn/svm/_classes.py @@ -351,7 +351,7 @@ def fit(self, X, y, sample_weight=None): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test when _dual=True, see meta-issue #162298 + # TODO: replace by a statistical test when _dual=True, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -615,7 +615,7 @@ def fit(self, X, y, sample_weight=None): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: replace by a statistical test, see meta-issue #162298 + # TODO: replace by a statistical test, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -900,7 +900,7 @@ def __sklearn_tags__(self): tags._xfail_checks = { # TODO: fix sample_weight handling of this estimator when probability=False # TODO: replace by a statistical test when probability=True - # see meta-issue #162298 + # see meta-issue #16298 "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." ), @@ -1177,7 +1177,7 @@ def __sklearn_tags__(self): "check_class_weight_classifiers": "class_weight is ignored.", # TODO: fix sample_weight handling of this estimator when probability=False # TODO: replace by a statistical test when probability=True - # see meta-issue #162298 + # see meta-issue #16298 "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." ), @@ -1381,7 +1381,7 @@ def __init__( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: fix sample_weight handling of this estimator, see meta-issue #162298 + # TODO: fix sample_weight handling of this estimator, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -1576,7 +1576,7 @@ def __init__( def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: fix sample_weight handling of this estimator, see meta-issue #162298 + # TODO: fix sample_weight handling of this estimator, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples." @@ -1840,7 +1840,7 @@ def predict(self, X): def __sklearn_tags__(self): tags = super().__sklearn_tags__() - # TODO: fix sample_weight handling of this estimator, see meta-issue #162298 + # TODO: fix sample_weight handling of this estimator, see meta-issue #16298 tags._xfail_checks = { "check_sample_weight_equivalence": ( "sample_weight is not equivalent to removing/repeating samples."