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

23 lines
501 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()
{
2016-04-25 18:16:53 +00:00
$glass = new Glass();
2016-04-09 13:46:54 +00:00
// whole dataset
2016-04-25 18:16:53 +00:00
$this->assertEquals(214, count($glass->getSamples()));
2016-06-16 21:56:15 +00:00
$this->assertEquals(214, count($glass->getTargets()));
2016-04-09 13:46:54 +00:00
// one sample features count
2016-04-25 18:16:53 +00:00
$this->assertEquals(9, count($glass->getSamples()[0]));
2016-04-09 13:46:54 +00:00
}
}