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