train($split->getTrainSamples(), $split->getTrainLabels()); $stop = microtime(true); $predicted = $pipeline->predict($split->getTestSamples()); echo 'Train: ' . round($stop - $start, 4) . 's'. PHP_EOL; echo 'Estimator: ' . get_class($pipeline->getEstimator()) . PHP_EOL; echo 'Tokenizer: ' . get_class($tokenizer) . PHP_EOL; echo 'Accuracy: ' . Accuracy::score($split->getTestLabels(), $predicted); $modelManager = new ModelManager(); $modelManager->saveToFile($pipeline, __DIR__.'/../model/bbc-nb.phpml');