Exemple #1
0
        public void AnyInt16_MinMax()
        {
            var anon       = new AnonymousData();
            var classifier = new Classifier <short>();

            classifier.AddClassification("GT", d => d > 0);
            classifier.AddClassification("LT", d => d < 0);

            classifier.Classify(() => anon.AnyInt16(short.MinValue, short.MaxValue));

            Assert.True(classifier["GT"] > 0.4);
            Assert.True(classifier["LT"] > 0.4);
        }
Exemple #2
0
        public void AnyInt16_Distribution()
        {
            var anon       = new AnonymousData();
            var classifier = new Classifier <short>();

            classifier.AddClassification("GT", d => d > 0);
            classifier.AddClassification("LT", d => d < 0);

            classifier.Classify(() => anon.AnyInt16(Distribution.Uniform));

            Assert.True(classifier["GT"] > 0.4);
            Assert.True(classifier["LT"] > 0.4);
        }