parameters: (self, data, name)
docstring: Add validation data.
  
          Parameters
          ----------
          data : Dataset
              Validation data.
          name : string
              Name of validation data.
docstring_summary: Add validation data.
docstring_tokens: Add validation data .
function: def add_valid(self, data, name):
          """Add validation data.
  
          Parameters
          ----------
          data : Dataset
              Validation data.
          name : string
              Name of validation data.
          """
          if not isinstance(data, Dataset):
              raise TypeError('Validation data should be Dataset instance, met {}'.format(type(data).__name__))
          if data._predictor is not self.__init_predictor:
              raise LightGBMError("Add validation data failed, you should use same predictor for these data")
          _safe_call(_LIB.LGBM_BoosterAddValidData(
              self.handle,
              data.construct().handle))
          self.valid_sets.append(data)
          self.name_valid_sets.append(name)
          self.__num_dataset += 1
          self.__inner_predict_buffer.append(None)
          self.__is_predicted_cur_iter.append(False)
function_tokens: def add_valid ( self , data , name ) : if not isinstance ( data , Dataset ) : raise TypeError ( 'Validation data should be Dataset instance, met {}' . format ( type ( data ) . __name__ ) ) if data . _predictor is not self . __init_predictor : raise LightGBMError ( "Add validation data failed, you should use same predictor for these data" ) _safe_call ( _LIB . LGBM_BoosterAddValidData ( self . handle , data . construct ( ) . handle ) ) self . valid_sets . append ( data ) self . name_valid_sets . append ( name ) self . __num_dataset += 1 self . __inner_predict_buffer . append ( None ) self . __is_predicted_cur_iter . append ( False )