public void PredictEndLocation()
        {
            foreach (var driver in drivers)
            {
                RoutePrediction routePrediction = new RoutePrediction(500);
                foreach (TripSummary trip in trips.Where(t => t.DriverId.Equals(driver)))
                {
                    routePrediction.AddTripSummary(trip);
                }

                double lat = 47.6583066666667;
                double lon = -122.14119;
                RoutePredictionResult predictionResult = routePrediction.PredictEndLocation(lat, lon, DateTime.Now);
                Console.WriteLine("driver: " + driver);
                Console.WriteLine("cluster level: " + predictionResult.ClusterLevel);

                foreach (var prediction in predictionResult.Predictions)
                {
                    Console.Write("Lat/Lon: " + prediction.Lat + "/" + prediction.Lon);
                    Console.Write("\tProbability: " + prediction.Probability);
                    Console.Write("\tEndpoints: " + prediction.NrOfEndPoints);
                    Console.Write("\tMatches T/D/W: " + prediction.NrOfTimeMatches);
                    Console.Write("/" + prediction.NrOfDayMatches);
                    Console.WriteLine("/" + prediction.NrOfWorkdayMatches);
                }
                Console.WriteLine();
            }
        }
        public void TrainAndValidate()
        {
            var clusterSizes = new int[] { 10, 100, 150, 200, 250, 300, 400, 500, 750, 1000, 2000 };
            CSVWriter csvWriter = new CSVWriter(@"..\..\testdata\validations.csv", ";");

            Console.WriteLine("Writing validation results to validations.csv");

            foreach (var driver in drivers)
            {
                var currentTrips = trips.Where(t => t.DriverId.Equals(driver));

                for (int i = 1; i < currentTrips.Count() - 1; i++)
                {

                    List<TripSummary> trainingSet = new List<TripSummary>();
                    List<TripSummary> validationSet = new List<TripSummary>();

                    int j = 0;
                    foreach (var trip in currentTrips)
                    {
                        if (j++<i)
                        {
                            trainingSet.Add(trip);
                        }
                        else
                        {
                            validationSet.Add(trip);
                        }
                    }

                    foreach (var clusterSize in clusterSizes)
                    {
                        RoutePrediction routePrediction = new RoutePrediction(clusterSize);

                        RoutePredictionValidationResult result = routePrediction.TrainAndValidate(trainingSet, validationSet);
                        csvWriter.WriteRow(driver, clusterSize, trainingSet.Count(), validationSet.Count(), result.Validations);
                    }
                }
            }
            Console.WriteLine("done");
        }