mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-24 13:57:33 +00:00
add .coverage to git ignore
This commit is contained in:
parent
6ed4761427
commit
2a76cbb402
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/vendor/
|
/vendor/
|
||||||
humbuglog.*
|
humbuglog.*
|
||||||
/bin/phpunit
|
/bin/phpunit
|
||||||
|
.coverage
|
||||||
|
@ -79,4 +79,24 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$this->assertEquals($normalized, $samples, '', $delta = 0.01);
|
$this->assertEquals($normalized, $samples, '', $delta = 0.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testL1NormWithZeroSumCondition()
|
||||||
|
{
|
||||||
|
$samples = [
|
||||||
|
[0, 0, 0],
|
||||||
|
[2, 0, 0],
|
||||||
|
[0, 1, -1],
|
||||||
|
];
|
||||||
|
|
||||||
|
$normalized = [
|
||||||
|
[0.33, 0.33, 0.33],
|
||||||
|
[1.0, 0.0, 0.0],
|
||||||
|
[0.0, 0.5, -0.5],
|
||||||
|
];
|
||||||
|
|
||||||
|
$normalizer = new Normalizer(Normalizer::NORM_L1);
|
||||||
|
$normalizer->transform($samples);
|
||||||
|
|
||||||
|
$this->assertEquals($normalized, $samples, '', $delta = 0.01);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user