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