mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2025-01-26 00:28:31 +00:00
simple pipeline test
This commit is contained in:
parent
374182a6d4
commit
15519ba122
27
tests/Phpml/PipelineTest.php
Normal file
27
tests/Phpml/PipelineTest.php
Normal 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());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user