mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-22 13:05:10 +00:00
28 lines
580 B
PHP
28 lines
580 B
PHP
|
<?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());
|
||
|
}
|
||
|
|
||
|
}
|