php-ml/tests/Dataset/Demo/GlassDatasetTest.php

24 lines
511 B
PHP
Raw Normal View History

2016-04-09 13:46:54 +00:00
<?php
2016-11-20 21:53:17 +00:00
declare(strict_types=1);
2016-04-09 13:46:54 +00:00
namespace Phpml\Tests\Dataset\Demo;
2016-04-09 13:46:54 +00:00
use Phpml\Dataset\Demo\GlassDataset;
2017-02-03 11:58:25 +00:00
use PHPUnit\Framework\TestCase;
2016-04-09 13:46:54 +00:00
2017-02-03 11:58:25 +00:00
class GlassDatasetTest extends TestCase
2016-04-09 13:46:54 +00:00
{
public function testLoadingWineDataset(): void
2016-04-09 13:46:54 +00:00
{
$glass = new GlassDataset();
2016-04-09 13:46:54 +00:00
// whole dataset
2018-10-28 06:44:52 +00:00
self::assertCount(214, $glass->getSamples());
self::assertCount(214, $glass->getTargets());
2016-04-09 13:46:54 +00:00
// one sample features count
2018-10-28 06:44:52 +00:00
self::assertCount(9, $glass->getSamples()[0]);
2016-04-09 13:46:54 +00:00
}
}