private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { var f = new ThreeSigmaOutliersFinder(_points.Select(p => p.Y)); var outliersY = f.Find(); f = new ThreeSigmaOutliersFinder(_points.Select(p => p.X)); var outliersX = f.Find(); _points = new ScatterPointCollection(_points.Where(p => outliersY.Contains(p.Y) == false)); _points = new ScatterPointCollection(_points.Where(p => outliersX.Contains(p.X) == false)); ResetCanvas(); Draw(); }
private void DrawRegressionLine(int groupIndex) { var categoryPoints = _points.Where(x => Math.Abs(x.Group) == groupIndex).ToArray(); DrawRegressionLine(categoryPoints, groupIndex); }