parameters: (self, X, y=None)
return_statement: return self
docstring: Set parameters.
docstring_summary: Set parameters.
docstring_tokens: Set parameters .
function: def fit(self, X, y=None):
          """Set parameters."""
          X = check_array(X, accept_sparse='csr')
          if self.sample_interval is None:
              # See reference, figure 2 c)
              if self.sample_steps == 1:
                  self.sample_interval_ = 0.8
              elif self.sample_steps == 2:
                  self.sample_interval_ = 0.5
              elif self.sample_steps == 3:
                  self.sample_interval_ = 0.4
              else:
                  raise ValueError("If sample_steps is not in [1, 2, 3],"
                                   " you need to provide sample_interval")
          else:
              self.sample_interval_ = self.sample_interval
          return self
function_tokens: def fit ( self , X , y = None ) : X = check_array ( X , accept_sparse = 'csr' ) if self . sample_interval is None : # See reference, figure 2 c) if self . sample_steps == 1 : self . sample_interval_ = 0.8 elif self . sample_steps == 2 : self . sample_interval_ = 0.5 elif self . sample_steps == 3 : self . sample_interval_ = 0.4 else : raise ValueError ( "If sample_steps is not in [1, 2, 3]," " you need to provide sample_interval" ) else : self . sample_interval_ = self . sample_interval return self