2016-04-06 21:46:17 +02:00
|
|
|
<?php
|
2016-04-06 22:38:08 +02:00
|
|
|
|
2016-11-20 22:53:17 +01:00
|
|
|
declare(strict_types=1);
|
2016-04-06 21:46:17 +02:00
|
|
|
|
2016-04-07 22:12:36 +02:00
|
|
|
namespace tests\Phpml\Dataset\Demo;
|
2016-04-06 21:46:17 +02:00
|
|
|
|
2016-09-30 14:02:08 +02:00
|
|
|
use Phpml\Dataset\Demo\IrisDataset;
|
2016-04-06 21:46:17 +02:00
|
|
|
|
2016-09-30 14:02:08 +02:00
|
|
|
class IrisDatasetTest extends \PHPUnit_Framework_TestCase
|
2016-04-06 21:46:17 +02:00
|
|
|
{
|
|
|
|
public function testLoadingIrisDataset()
|
|
|
|
{
|
2016-09-30 14:02:08 +02:00
|
|
|
$iris = new IrisDataset();
|
2016-04-06 21:46:17 +02:00
|
|
|
|
|
|
|
// whole dataset
|
2016-12-12 19:31:30 +01:00
|
|
|
$this->assertCount(150, $iris->getSamples());
|
|
|
|
$this->assertCount(150, $iris->getTargets());
|
2016-04-06 21:46:17 +02:00
|
|
|
|
|
|
|
// one sample features count
|
2016-12-12 19:31:30 +01:00
|
|
|
$this->assertCount(4, $iris->getSamples()[0]);
|
2016-04-06 21:46:17 +02:00
|
|
|
}
|
2016-04-06 22:38:08 +02:00
|
|
|
}
|