original_string: protected function filter_out_train_samples(array &$sampleids, \core_analytics\local\time_splitting\base $timesplitting) {
          global $DB;
  
          $params = array('modelid' => $this->analyser->get_modelid(), 'analysableid' => $timesplitting->get_analysable()->get_id(),
              'timesplitting' => $timesplitting->get_id());
  
          $trainingsamples = $DB->get_records('analytics_train_samples', $params);
  
          // Skip each file trained samples.
          foreach ($trainingsamples as $trainingfile) {
  
              $usedsamples = json_decode($trainingfile->sampleids, true);
  
              if (!empty($usedsamples)) {
                  // Reset $sampleids to $sampleids minus this file's $usedsamples.
                  $sampleids = array_diff_key($sampleids, $usedsamples);
              }
          }
      }
code: protected function filter_out_train_samples(array &$sampleids, \core_analytics\local\time_splitting\base $timesplitting) {
          global $DB;
  
          $params = array('modelid' => $this->analyser->get_modelid(), 'analysableid' => $timesplitting->get_analysable()->get_id(),
              'timesplitting' => $timesplitting->get_id());
  
          $trainingsamples = $DB->get_records('analytics_train_samples', $params);
  
          // Skip each file trained samples.
          foreach ($trainingsamples as $trainingfile) {
  
              $usedsamples = json_decode($trainingfile->sampleids, true);
  
              if (!empty($usedsamples)) {
                  // Reset $sampleids to $sampleids minus this file's $usedsamples.
                  $sampleids = array_diff_key($sampleids, $usedsamples);
              }
          }
      }
code_tokens: protected function filter_out_train_samples ( array & $ sampleids , \ core_analytics \ local \ time_splitting \ base $ timesplitting ) { global $ DB ; $ params = array ( 'modelid' => $ this -> analyser -> get_modelid ( ) , 'analysableid' => $ timesplitting -> get_analysable ( ) -> get_id ( ) , 'timesplitting' => $ timesplitting -> get_id ( ) ) ; $ trainingsamples = $ DB -> get_records ( 'analytics_train_samples' , $ params ) ; // Skip each file trained samples. foreach ( $ trainingsamples as $ trainingfile ) { $ usedsamples = json_decode ( $ trainingfile -> sampleids , true ) ; if ( ! empty ( $ usedsamples ) ) { // Reset $sampleids to $sampleids minus this file's $usedsamples. $ sampleids = array_diff_key ( $ sampleids , $ usedsamples ) ; } } }
docstring: Filters out samples that have already been used for training.
  
  @param int[] $sampleids
  @param \core_analytics\local\time_splitting\base $timesplitting
  @return  null
docstring_tokens: Filters out samples that have already been used for training .