php-ml/tests/Phpml/Dataset/Demo/WineDatasetTest.php

23 lines
489 B
PHP
Raw Normal View History

2016-04-09 13:33:05 +00:00
<?php
2016-11-20 21:53:17 +00:00
declare(strict_types=1);
2016-04-09 13:33:05 +00:00
namespace tests\Phpml\Dataset\Demo;
use Phpml\Dataset\Demo\WineDataset;
2016-04-09 13:33:05 +00:00
class WineDatasetTest extends \PHPUnit_Framework_TestCase
2016-04-09 13:33:05 +00:00
{
public function testLoadingWineDataset()
{
$wine = new WineDataset();
2016-04-09 13:33:05 +00:00
// whole dataset
2016-12-12 18:31:30 +00:00
$this->assertCount(178, $wine->getSamples());
$this->assertCount(178, $wine->getTargets());
2016-04-09 13:33:05 +00:00
// one sample features count
2016-12-12 18:31:30 +00:00
$this->assertCount(13, $wine->getSamples()[0]);
2016-04-09 13:33:05 +00:00
}
}