mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-13 08:56:29 +00:00
db82afa263
* Update to phpunit 8 * Require at least PHP 7.2
25 lines
605 B
PHP
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
|
|
);
|
|
}
|
|
}
|