@@ -37,7 +37,7 @@ class attribute, which is a dictionary `param_name: list of constraints`. See
3737 )
3838
3939
40- class SamplerMixin (_ParamsValidationMixin , BaseEstimator , metaclass = ABCMeta ):
40+ class SamplerMixin (_ParamsValidationMixin , metaclass = ABCMeta ):
4141 """Mixin class for samplers with abstract method.
4242
4343 Warning: This class should not be used directly. Use the derive classes
@@ -135,7 +135,7 @@ def _fit_resample(self, X, y):
135135 pass
136136
137137
138- class BaseSampler (SamplerMixin , OneToOneFeatureMixin ):
138+ class BaseSampler (SamplerMixin , OneToOneFeatureMixin , BaseEstimator ):
139139 """Base class for sampling algorithms.
140140
141141 Warning: This class should not be used directly. Use the derive classes
@@ -204,9 +204,15 @@ def _more_tags(self):
204204
205205 @available_if (check_version_package ("sklearn" , ">=" , "1.6" ))
206206 def __sklearn_tags__ (self ):
207- tags = super ().__sklearn_tags__ ()
208-
209- from .utils ._tags import InputTags
207+ from .utils ._tags import Tags , SamplerTags , TargetTags , InputTags
208+ tags = Tags (
209+ estimator_type = "sampler" ,
210+ target_tags = TargetTags (required = True ),
211+ transformer_tags = None ,
212+ regressor_tags = None ,
213+ classifier_tags = None ,
214+ sampler_tags = SamplerTags (),
215+ )
210216 tags .input_tags = InputTags ()
211217 tags .input_tags .two_d_array = True
212218 tags .input_tags .sparse = True
0 commit comments