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

23 lines
493 B
PHP
Raw Normal View History

2016-04-06 19:46:17 +00:00
<?php
declare (strict_types = 1);
2016-04-06 19:46:17 +00:00
2016-04-07 20:12:36 +00:00
namespace tests\Phpml\Dataset\Demo;
2016-04-06 19:46:17 +00:00
2016-04-07 20:12:36 +00:00
use Phpml\Dataset\Demo\Iris;
2016-04-06 19:46:17 +00:00
class IrisTest extends \PHPUnit_Framework_TestCase
{
public function testLoadingIrisDataset()
{
$iris = new Iris();
// whole dataset
$this->assertEquals(150, count($iris->getSamples()));
$this->assertEquals(150, count($iris->getLabels()));
// one sample features count
$this->assertEquals(4, count($iris->getSamples()[0]));
}
}