original_string: public function prepare(Mapper $mapper)
      {
          if ($this->isPrepared()) {
              throw new DataSetPreparationException('DataSet is already prepared');
          }
          //Split each row of the dataSet into inputs and outputs based on the mapper and the policies
          //Then re-parse the dataSet to fill in all the fields that used special policies (like Avg) and create the instances
          $this->map($mapper)->createInstances();
  
          //mark the dataSet as prepared
          $this->isPrepared = true;
      }
code: public function prepare(Mapper $mapper)
      {
          if ($this->isPrepared()) {
              throw new DataSetPreparationException('DataSet is already prepared');
          }
          //Split each row of the dataSet into inputs and outputs based on the mapper and the policies
          //Then re-parse the dataSet to fill in all the fields that used special policies (like Avg) and create the instances
          $this->map($mapper)->createInstances();
  
          //mark the dataSet as prepared
          $this->isPrepared = true;
      }
code_tokens: public function prepare ( Mapper $ mapper ) { if ( $ this -> isPrepared ( ) ) { throw new DataSetPreparationException ( 'DataSet is already prepared' ) ; } //Split each row of the dataSet into inputs and outputs based on the mapper and the policies //Then re-parse the dataSet to fill in all the fields that used special policies (like Avg) and create the instances $ this -> map ( $ mapper ) -> createInstances ( ) ; //mark the dataSet as prepared $ this -> isPrepared = true ; }
docstring: Prepare data to be trained. MUST be called prior to any call
  @param Mapper $mapper Data Mapper
  @throws DataSetPreparationException
docstring_tokens: Prepare data to be trained . MUST be called prior to any call