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

23 lines
496 B
PHP
Raw Normal View History

2016-04-09 13:46:54 +00:00
<?php
declare (strict_types = 1);
namespace tests\Phpml\Dataset\Demo;
use Phpml\Dataset\Demo\Glass;
class GlassTest extends \PHPUnit_Framework_TestCase
{
public function testLoadingWineDataset()
{
$iris = new Glass();
// whole dataset
$this->assertEquals(214, count($iris->getSamples()));
$this->assertEquals(214, count($iris->getLabels()));
// one sample features count
$this->assertEquals(9, count($iris->getSamples()[0]));
}
}