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

24 lines
514 B
PHP
Raw Normal View History

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