. /** * Predictions processor interface. * * @package core_analytics * @copyright 2017 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core_analytics; defined('MOODLE_INTERNAL') || die(); /** * Predictors interface. * * @package core_analytics * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ interface predictor { /** * Is it ready to predict? * * @return bool */ public function is_ready(); /** * Train the provided dataset. * * @param int $modelid * @param \stored_file $dataset * @param string $outputdir * @return \stdClass */ public function train($modelid, \stored_file $dataset, $outputdir); /** * Predict the provided dataset samples. * * @param int $modelid * @param \stored_file $dataset * @param string $outputdir * @return \stdClass */ public function predict($modelid, \stored_file $dataset, $outputdir); /** * evaluate * * @param int $modelid * @param float $maxdeviation * @param int $niterations * @param \stored_file $dataset * @param string $outputdir * @return \stdClass */ public function evaluate($modelid, $maxdeviation, $niterations, \stored_file $dataset, $outputdir); }