Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/undo-ransomware/ransomware_detection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias <ilovemilk@wusa.io>2019-05-17 18:43:06 +0300
committerMatthias <ilovemilk@wusa.io>2019-05-17 18:43:06 +0300
commitca94620e473a5c3ec48e548fe3e40d0d103ec47f (patch)
tree6596853e2de7a24d1b0104fe3dd3ca8a8da15f4f /tests/Unit
parent8b22abc9a6c6ed29b54fe6ae480e670e2584353a (diff)
add more standard deviation tests
Diffstat (limited to 'tests/Unit')
-rw-r--r--tests/Unit/Entropy/EntropyTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/Unit/Entropy/EntropyTest.php b/tests/Unit/Entropy/EntropyTest.php
index c4f515d..2e74ecf 100644
--- a/tests/Unit/Entropy/EntropyTest.php
+++ b/tests/Unit/Entropy/EntropyTest.php
@@ -63,7 +63,9 @@ class EntropyTest extends TestCase
public function dataSd()
{
$tests = [];
- $tests[] = [[10, 2, 38, 23, 38, 23, 21], 13.284434];
+ $tests[] = [[10, 2, 38, 23, 38, 23, 21], 12.298996];
+ $tests[] = [[10, 12, 23, 23, 16, 23, 21, 16], 4.898979]
+ $tests[] = [[-5, 1, 8, 7, 2], 4.673328]
return $tests;
}
@@ -76,7 +78,6 @@ class EntropyTest extends TestCase
*/
public function testSd($data, $sd)
{
- $this->assertEquals(number_format($this->invokePrivate($this->entropy, 'sd', [$data]), 6), $sd);
$sum = 0.0;
$mean = 0.0;
$standardDeviation = 0.0;