php-ml/tests/Phpml/PipelineTest.php

28 lines
580 B
PHP
Raw Normal View History

2016-06-16 07:58:17 +00:00
<?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());
}
}