Ejemplo n.º 1
0
        public static void OutlierHandling(Int16 carId)
        {
            List<Int64> tripIds = new List<long>();
            DBController dbc = new DBController();
            tripIds = dbc.GetTripIdsByCarId(carId);

            Int64 outliersCount = 0;

            foreach (Int64 tripId in tripIds) {
                List<Int64> outliers = OutlierDetection.RemoveOutliers(carId, tripId);
                if (outliers.Count != 0) {
                    dbc.UpdateEntriesWithNoTrip(outliers);
                }
                outliersCount += OutlierDetection.RemoveOutliers(carId, tripId).Count();
            }
            dbc.Close();
            Console.WriteLine("Car " + carId + " removed " + outliersCount + " outliers.");
        }