#NEWLINE# def get_params( self , deep = True ) : #NEWLINE# #INDENT# 'Get parameters for this estimator.\n\n        Parameters\n        ----------\n        deep: boolean, optional\n            If True, will return the parameters for this estimator and\n            contained subobjects that are estimators.\n\n        Returns\n        -------\n        params : mapping of string to any\n            Parameter names mapped to their values.\n        ' #NEWLINE# out = dict ( ) #NEWLINE# for key in self . _get_param_names ( ) : #NEWLINE# #INDENT# warnings . simplefilter ( 'always' , DeprecationWarning ) #NEWLINE# try : #NEWLINE# #INDENT# with warnings . catch_warnings ( record = True ) as w : #NEWLINE# #INDENT# value = getattr ( self , key , None ) #NEWLINE# #UNINDENT# if ( len ( w ) and ( w [ 0 ] . category == DeprecationWarning ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# warnings . filters . pop ( 0 ) #NEWLINE# #UNINDENT# if ( deep and hasattr ( value , 'get_params' ) ) : #NEWLINE# #INDENT# deep_items = value . get_params ( ) . items ( ) #NEWLINE# out . update ( ( ( ( ( key + '__' ) + k ) , val ) for ( k , val ) in deep_items ) ) #NEWLINE# #UNINDENT# out [ key ] = value #NEWLINE# #UNINDENT# return out