protected function save_train_samples(array $sampleids, \core_analytics\local\time_splitting\base $timesplitting) {
        global $DB;

        $trainingsamples = new \stdClass();
        $trainingsamples->modelid = $this->analyser->get_modelid();
        $trainingsamples->analysableid = $timesplitting->get_analysable()->get_id();
        $trainingsamples->timesplitting = $timesplitting->get_id();

        $trainingsamples->sampleids = json_encode($sampleids);
        $trainingsamples->timecreated = time();

        $DB->insert_record('analytics_train_samples', $trainingsamples);
    }