simple pipeline test

This commit is contained in:
Arkadiusz Kondas 2016-06-16 09:58:17 +02:00
parent 374182a6d4
commit 15519ba122
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?php
declare (strict_types = 1);
namespace tests;
use Phpml\Classification\SVC;
use Phpml\FeatureExtraction\TfIdfTransformer;
use Phpml\Pipeline;
class PipelineTest extends \PHPUnit_Framework_TestCase
{
public function testPipelineConstruction()
{
$transformers = [
new TfIdfTransformer()
];
$estimator = new SVC();
$pipeline = new Pipeline($transformers, $estimator);
$this->assertEquals($transformers, $pipeline->getTransformers());
$this->assertEquals($estimator, $pipeline->getEstimator());
}
}