Exemple #1
0
        public static void GenerateScatterPlot <T>(List <IGrouping <T, Row> > groups, Row[] data, string outputFile)
        {
            List <Tuple <double, int, int> > tuples = ErrorScrubber.ReturnMaxErrorForMatchedGroups <T>(groups);

            using (StreamWriter sw = File.CreateText(outputFile))
            {
                foreach (Tuple <double, int, int> tuple in tuples)
                {
                    sw.WriteLine($"{tuple.Item2},{tuple.Item3},{tuple.Item1}");
                }
            }
        }
Exemple #2
0
        public static void WriteWorstToDisk <T>(List <IGrouping <T, Row> > groups, Row[] data, string outputFile, double threshold)
        {
            List <Tuple <double, int, int> > tuples = ErrorScrubber.ReturnMaxErrorForMatchedGroups <T>(groups);

            using (StreamWriter sw = File.CreateText(outputFile))
            {
                foreach (Tuple <double, int, int> tuple in tuples)
                {
                    if (tuple.Item1 > threshold)
                    {
                        sw.WriteLine(data.Where(n => n.EnterpriseID == tuple.Item2).First().ToString());
                        sw.WriteLine(data.Where(n => n.EnterpriseID == tuple.Item3).First().ToString());
                        sw.WriteLine();
                    }
                }
            }
        }