parameters: (self, for_partial_fit=False)
docstring: Validate input params.
docstring_summary: Validate input params.
docstring_tokens: Validate input params .
function: def _validate_params(self, for_partial_fit=False):
          """Validate input params. """
          if not isinstance(self.shuffle, bool):
              raise ValueError("shuffle must be either True or False")
          if not isinstance(self.early_stopping, bool):
              raise ValueError("early_stopping must be either True or False")
          if self.early_stopping and for_partial_fit:
              raise ValueError("early_stopping should be False with partial_fit")
          if self.max_iter is not None and self.max_iter <= 0:
              raise ValueError("max_iter must be > zero. Got %f" % self.max_iter)
          if not (0.0 <= self.l1_ratio <= 1.0):
              raise ValueError("l1_ratio must be in [0, 1]")
          if self.alpha < 0.0:
              raise ValueError("alpha must be >= 0")
          if self.n_iter_no_change < 1:
              raise ValueError("n_iter_no_change must be >= 1")
          if not (0.0 < self.validation_fraction < 1.0):
              raise ValueError("validation_fraction must be in range (0, 1)")
          if self.learning_rate in ("constant", "invscaling", "adaptive"):
              if self.eta0 <= 0.0:
                  raise ValueError("eta0 must be > 0")
          if self.learning_rate == "optimal" and self.alpha == 0:
              raise ValueError("alpha must be > 0 since "
                               "learning_rate is 'optimal'. alpha is used "
                               "to compute the optimal learning rate.")
  
          # raises ValueError if not registered
          self._get_penalty_type(self.penalty)
          self._get_learning_rate_type(self.learning_rate)
  
          if self.loss not in self.loss_functions:
              raise ValueError("The loss %s is not supported. " % self.loss)
function_tokens: def _validate_params ( self , for_partial_fit = False ) : if not isinstance ( self . shuffle , bool ) : raise ValueError ( "shuffle must be either True or False" ) if not isinstance ( self . early_stopping , bool ) : raise ValueError ( "early_stopping must be either True or False" ) if self . early_stopping and for_partial_fit : raise ValueError ( "early_stopping should be False with partial_fit" ) if self . max_iter is not None and self . max_iter <= 0 : raise ValueError ( "max_iter must be > zero. Got %f" % self . max_iter ) if not ( 0.0 <= self . l1_ratio <= 1.0 ) : raise ValueError ( "l1_ratio must be in [0, 1]" ) if self . alpha < 0.0 : raise ValueError ( "alpha must be >= 0" ) if self . n_iter_no_change < 1 : raise ValueError ( "n_iter_no_change must be >= 1" ) if not ( 0.0 < self . validation_fraction < 1.0 ) : raise ValueError ( "validation_fraction must be in range (0, 1)" ) if self . learning_rate in ( "constant" , "invscaling" , "adaptive" ) : if self . eta0 <= 0.0 : raise ValueError ( "eta0 must be > 0" ) if self . learning_rate == "optimal" and self . alpha == 0 : raise ValueError ( "alpha must be > 0 since " "learning_rate is 'optimal'. alpha is used " "to compute the optimal learning rate." ) # raises ValueError if not registered self . _get_penalty_type ( self . penalty ) self . _get_learning_rate_type ( self . learning_rate ) if self . loss not in self . loss_functions : raise ValueError ( "The loss %s is not supported. " % self . loss )