@@ -225,21 +225,7 @@ def get_params(self, deep=True):
225225 """
226226 out = dict ()
227227 for key in self ._get_param_names ():
228- # We need deprecation warnings to always be on in order to
229- # catch deprecated param values.
230- # This is set in utils/__init__.py but it gets overwritten
231- # when running under python3 somehow.
232- warnings .simplefilter ("always" , DeprecationWarning )
233- try :
234- with warnings .catch_warnings (record = True ) as w :
235- value = getattr (self , key , None )
236- if len (w ) and w [0 ].category == DeprecationWarning :
237- # if the parameter is deprecated, don't show it
238- continue
239- finally :
240- warnings .filters .pop (0 )
241-
242- # XXX: should we rather test if instance of estimator?
228+ value = getattr (self , key , None )
243229 if deep and hasattr (value , 'get_params' ):
244230 deep_items = value .get_params ().items ()
245231 out .update ((key + '__' + k , val ) for k , val in deep_items )
@@ -316,7 +302,6 @@ def __setstate__(self, state):
316302 self .__dict__ .update (state )
317303
318304
319-
320305###############################################################################
321306class ClassifierMixin (object ):
322307 """Mixin class for all classifiers in scikit-learn."""
0 commit comments