Beispiel #1
0
        public void TestComputeRawAnomalyPartialNoMatch()
        {
            double score = Anomaly.ComputeRawAnomalyScore(new[] { 2, 3, 6 }, new[] { 3, 5, 7 });

            Console.WriteLine((2.0 / 3.0));
            Assert.AreEqual(score, 2.0 / 3.0, 0.001);
        }
Beispiel #2
0
        public void TestComputeRawAnomalyScoreNoActive()
        {
            double score = Anomaly.ComputeRawAnomalyScore(new int[0], new[] { 3, 5 });

            Assert.AreEqual(score, 0.0, 0.00001);
        }
Beispiel #3
0
        public void TestComputeRawAnomalyScoreNoMatch()
        {
            double score = Anomaly.ComputeRawAnomalyScore(new[] { 2, 4, 6 }, new[] { 3, 5, 7 });

            Assert.AreEqual(score, 1.0, 0.00001);
        }
Beispiel #4
0
        public void TestComputeRawAnomalyScoreNoActiveOrPredicted()
        {
            double score = Anomaly.ComputeRawAnomalyScore(new int[0], new int[0]);

            Assert.AreEqual(score, 0.0, 0.00001);
        }