public void DoubleMadOutlierDetectorHdQeTest([NotNull] string testDataKey) { var testData = HdQeTestDataMap[testDataKey]; void Action() => Check(testData, values => DoubleMadOutlierDetector.Create(values, quantileEstimator: HarrellDavisQuantileEstimator.Instance)); if (testData.Values.IsEmpty()) { Assert.Throws <ArgumentOutOfRangeException>(Action); } else { Action(); } }
public void Run() { var simple = SimpleQuantileEstimator.Instance; var hd = HarrellDavisQuantileEstimator.Instance; var detectors = new[] { new Detector("TukeySimple", values => TukeyOutlierDetector.Create(values, quantileEstimator: simple)), new Detector("TukeyHd", values => TukeyOutlierDetector.Create(values, quantileEstimator: hd)), new Detector("MadSimple", values => MadOutlierDetector.Create(values, quantileEstimator: simple)), new Detector("MadHd", values => MadOutlierDetector.Create(values, quantileEstimator: hd)), new Detector("DoubleMadSimple", values => DoubleMadOutlierDetector.Create(values, quantileEstimator: simple)), new Detector("DoubleMadHd", values => DoubleMadOutlierDetector.Create(values, quantileEstimator: hd)) }; Case.DumpBaseSample(); BuildTable(detectors, new[] { new Case(1, 0), new Case(2, 0), new Case(3, 0) }); BuildTable(detectors, new[] { new Case(0, 1), new Case(0, 2), new Case(0, 3) }); BuildTable(detectors, new[] { new Case(1, 1), new Case(2, 2), new Case(3, 3) }); }