original_docstring: Operator
  
          This method returns the input data after the a clustering and a
          thresholding. Implements (Eq 24) in F2014
  
          Parameters
          ----------
          data : np.ndarray
              Input data array
          extra_factor : float
              Additional multiplication factor
  
          Returns
          -------
          np.ndarray thresholded data
  
          
docstring: Operator
  This method returns the input data after the a clustering and a
  thresholding. Implements (Eq 24) in F2014
  
  Parameters
  
  data : np.ndarray
  Input data array
  extra_factor : float
  Additional multiplication factor
  
  Returns
  
  
docstring_tokens: Operator This method returns the input data after the a clustering and a thresholding . Implements ( Eq 24 ) in F2014 Parameters data : np . ndarray Input data array extra_factor : float Additional multiplication factor Returns
code: def _op_method(self, data, extra_factor=1.0):
          """Operator
  
          This method returns the input data after the a clustering and a
          thresholding. Implements (Eq 24) in F2014
  
          Parameters
          ----------
          data : np.ndarray
              Input data array
          extra_factor : float
              Additional multiplication factor
  
          Returns
          -------
          np.ndarray thresholded data
  
          """
  
          # Update threshold with extra factor.
          threshold = self.weights * extra_factor
  
          # Squeezing the data
          data_squeezed = np.squeeze(data)
  
          # Sorting (non increasing order) input vector's absolute values
          data_abs = np.abs(data_squeezed)
          data_abs_sort_idx = np.argsort(data_abs)[::-1]
          data_abs = data_abs[data_abs_sort_idx]
  
          # Projection onto the monotone non-negative cone using
          # isotonic_regression
  
          data_abs = isotonic_regression(data_abs - threshold, y_min=0,
                                         increasing=False)
          # Unsorting the data
          data_abs_unsorted = data_abs[data_abs_sort_idx]
  
          # Putting the sign back
          with np.errstate(invalid='ignore'):
              sign_data = data_squeezed / np.abs(data_squeezed)
  
          # Removing NAN caused by the sign
          sign_data[np.isnan(sign_data)] = 0
  
          return np.reshape(sign_data * data_abs_unsorted, data.shape)
code_tokens: def _op_method ( self , data , extra_factor = 1.0 ) : threshold = self . weights * extra_factor data_squeezed = np . squeeze ( data ) data_abs = np . abs ( data_squeezed ) data_abs_sort_idx = np . argsort ( data_abs ) [ : : - 1 ] data_abs = data_abs [ data_abs_sort_idx ] data_abs = isotonic_regression ( data_abs - threshold , y_min = 0 , increasing = False ) data_abs_unsorted = data_abs [ data_abs_sort_idx ] with np . errstate ( invalid = 'ignore' ) : sign_data = data_squeezed / np . abs ( data_squeezed ) sign_data [ np . isnan ( sign_data ) ] = 0 return np . reshape ( sign_data * data_abs_unsorted , data . shape )
short_docstring: Operator
  This method returns the input data after the a clustering and a
  thresholding.
short_docstring_tokens: Operator This method returns the input data after the a clustering and a thresholding .
comment: """Operator
  
          This method returns the input data after the a clustering and a
          thresholding. Implements (Eq 24) in F2014
  
          Parameters
          ----------
          data : np.ndarray
              Input data array
          extra_factor : float
              Additional multiplication factor
  
          Returns
          -------
          np.ndarray thresholded data
  
          """$SEP$# Update threshold with extra factor.$SEP$# Squeezing the data$SEP$# Sorting (non increasing order) input vector's absolute values$SEP$# Projection onto the monotone non-negative cone using$SEP$# isotonic_regression$SEP$# Unsorting the data$SEP$# Putting the sign back$SEP$# Removing NAN caused by the sign