protected function load_classifier($outputdir) {
        $modelfilepath = $this->get_model_filepath($outputdir);

        if (!file_exists($modelfilepath)) {
            throw new \moodle_exception('errorcantloadmodel', 'mlbackend_php', '', $modelfilepath);
        }

        $modelmanager = new ModelManager();
        return $modelmanager->restoreFromFile($modelfilepath);
    }
protected function load_classifier($outputdir) {
        $modelfilepath = $this->get_model_filepath($outputdir);

        if (!file_exists($modelfilepath)) {
            throw new \moodle_exception('errorcantloadmodel', 'mlbackend_php', '', $modelfilepath);
        }

        $modelmanager = new ModelManager();
        return $modelmanager->restoreFromFile($modelfilepath);
    }
protected function load_classifier ( $ outputdir ) { $ modelfilepath = $ this -> get_model_filepath ( $ outputdir ) ; if ( ! file_exists ( $ modelfilepath ) ) { throw new \ moodle_exception ( 'errorcantloadmodel' , 'mlbackend_php' , '' , $ modelfilepath ) ; } $ modelmanager = new ModelManager ( ) ; return $ modelmanager -> restoreFromFile ( $ modelfilepath ) ; }
Loads the pre-trained classifier.

@throws \moodle_exception
@param string $outputdir
@return \Phpml\Classification\Linear\LogisticRegression
Loads the pre - trained classifier .