parameters: (self, X)
return_statement: return projection
docstring: Apply the approximate feature map to X.
  
          Parameters
          ----------
          X : {array-like, sparse matrix}, shape (n_samples, n_features)
              New data, where n_samples in the number of samples
              and n_features is the number of features.
  
          Returns
          -------
          X_new : array-like, shape (n_samples, n_components)
docstring_summary: Apply the approximate feature map to X.
docstring_tokens: Apply the approximate feature map to X .
function: def transform(self, X):
          """Apply the approximate feature map to X.
  
          Parameters
          ----------
          X : {array-like, sparse matrix}, shape (n_samples, n_features)
              New data, where n_samples in the number of samples
              and n_features is the number of features.
  
          Returns
          -------
          X_new : array-like, shape (n_samples, n_components)
          """
          check_is_fitted(self)
  
          X = check_array(X, accept_sparse='csr')
          projection = safe_sparse_dot(X, self.random_weights_)
          projection += self.random_offset_
          np.cos(projection, projection)
          projection *= np.sqrt(2.) / np.sqrt(self.n_components)
          return projection
function_tokens: def transform ( self , X ) : check_is_fitted ( self ) X = check_array ( X , accept_sparse = 'csr' ) projection = safe_sparse_dot ( X , self . random_weights_ ) projection += self . random_offset_ np . cos ( projection , projection ) projection *= np . sqrt ( 2. ) / np . sqrt ( self . n_components ) return projection