parameters: (self, X, y=None)
return_statement: return self
docstring: Fit the model with X.
  
          Samples random projection according to n_features.
  
          Parameters
          ----------
          X : array-like, shape (n_samples, n_features)
              Training data, where n_samples in the number of samples
              and n_features is the number of features.
  
          Returns
          -------
          self : object
              Returns the transformer.
docstring_summary: Fit the model with X.
docstring_tokens: Fit the model with X .
function: def fit(self, X, y=None):
          """Fit the model with X.
  
          Samples random projection according to n_features.
  
          Parameters
          ----------
          X : array-like, shape (n_samples, n_features)
              Training data, where n_samples in the number of samples
              and n_features is the number of features.
  
          Returns
          -------
          self : object
              Returns the transformer.
          """
  
          X = check_array(X)
          random_state = check_random_state(self.random_state)
          n_features = X.shape[1]
          uniform = random_state.uniform(size=(n_features, self.n_components))
          # transform by inverse CDF of sech
          self.random_weights_ = (1. / np.pi
                                  * np.log(np.tan(np.pi / 2. * uniform)))
          self.random_offset_ = random_state.uniform(0, 2 * np.pi,
                                                     size=self.n_components)
          return self
function_tokens: def fit ( self , X , y = None ) : X = check_array ( X ) random_state = check_random_state ( self . random_state ) n_features = X . shape [ 1 ] uniform = random_state . uniform ( size = ( n_features , self . n_components ) ) # transform by inverse CDF of sech self . random_weights_ = ( 1. / np . pi * np . log ( np . tan ( np . pi / 2. * uniform ) ) ) self . random_offset_ = random_state . uniform ( 0 , 2 * np . pi , size = self . n_components ) return self