php-ml/tests/FeatureSelection/ScoringFunction/ANOVAFValueTest.php
Marcin Michalski db82afa263 Update to phpunit 8 and bump min php to 7.2 (#367)
* Update to phpunit 8

* Require at least PHP 7.2
2019-04-10 20:42:59 +02:00

25 lines
605 B
PHP

<?php
declare(strict_types=1);
namespace Phpml\Tests\FeatureSelection\ScoringFunction;
use Phpml\Dataset\Demo\IrisDataset;
use Phpml\FeatureSelection\ScoringFunction\ANOVAFValue;
use PHPUnit\Framework\TestCase;
final class ANOVAFValueTest extends TestCase
{
public function testScoreForANOVAFValue(): void
{
$dataset = new IrisDataset();
$function = new ANOVAFValue();
self::assertEqualsWithDelta(
[119.2645, 47.3644, 1179.0343, 959.3244],
$function->score($dataset->getSamples(), $dataset->getTargets()),
0.0001
);
}
}