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 tests\Phpml\Dataset\Demo;
|
|
|
|
|
2016-09-30 12:02:08 +00:00
|
|
|
use Phpml\Dataset\Demo\GlassDataset;
|
2016-04-09 13:46:54 +00:00
|
|
|
|
2016-09-30 12:02:08 +00:00
|
|
|
class GlassDatasetTest extends \PHPUnit_Framework_TestCase
|
2016-04-09 13:46:54 +00:00
|
|
|
{
|
|
|
|
public function testLoadingWineDataset()
|
|
|
|
{
|
2016-09-30 12:02:08 +00:00
|
|
|
$glass = new GlassDataset();
|
2016-04-09 13:46:54 +00:00
|
|
|
|
|
|
|
// whole dataset
|
2016-12-12 18:31:30 +00:00
|
|
|
$this->assertCount(214, $glass->getSamples());
|
|
|
|
$this->assertCount(214, $glass->getTargets());
|
2016-04-09 13:46:54 +00:00
|
|
|
|
|
|
|
// one sample features count
|
2016-12-12 18:31:30 +00:00
|
|
|
$this->assertCount(9, $glass->getSamples()[0]);
|
2016-04-09 13:46:54 +00:00
|
|
|
}
|
|
|
|
}
|