Esempio n. 1
0
        public static void CheckThresholdFail()
        {
            var threshold = new NLUThreshold
            {
                Type = "intent",
            };

            var current  = GetStatistics(new ConfusionMatrix(0, 0, 2, 0));
            var baseline = GetStatistics(new ConfusionMatrix(1, 0, 1, 0));

            NLUAccuracy.CheckThreshold(current, baseline, threshold).Should().BeFalse();
        }
Esempio n. 2
0
        public static void CheckThresholdAbsoluteFail()
        {
            var threshold = new NLUThreshold
            {
                Type       = "intent",
                Threshold  = 0.5,
                Comparison = NLUThresholdKind.Absolute,
            };

            var current = GetStatistics(new ConfusionMatrix(0, 0, 1, 0));

            NLUAccuracy.CheckThreshold(current, null, threshold).Should().BeFalse();
        }