static async Task Main(string[] args)
        {
            try
            {
                var datasetColumns = new DataSetColumns();
                PopulateDataSet(datasetColumns);

                // Learn about your data
                UnderstandData(datasetColumns);

                // Find Correlations
                //FindCorrelations(datasetColumns);

                // Build and train your model
                //PredictionModel<TaxiTrip, TaxiTripFarePrediction> model = await Train();

                // Evaluate your model (sample test to see how accurate your model is)
                //Evaluate(model);

                // Use your model.
                //TaxiTripFarePrediction prediction = model.Predict(TestTrips.Trip1);
                //Console.WriteLine("Predicted fare: {0}, actual fare: 29.5", prediction.FareAmount);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            Console.WriteLine("Execution Complete -- Press Enter");
            Console.ReadLine();
        }
        public static void PopulateDataSet(DataSetColumns dataSetColumns)
        {
            var riders       = new List <int>();
            var tripTime     = new List <int>();
            var tripDistance = new List <double>();
            var fareAmount   = new List <double>();

            using (var reader = new StreamReader(_datapath))
            {
                reader.ReadLine(); // headers
                while (!reader.EndOfStream)
                {
                    var line   = reader.ReadLine();
                    var values = line.Split(',');
                    riders.Add(int.Parse(values[2]));
                    tripTime.Add(int.Parse(values[3]));
                    tripDistance.Add(double.Parse(values[4]));
                    fareAmount.Add(double.Parse(values[6]));
                }
            }
            dataSetColumns.Riders       = riders.ToArray();
            dataSetColumns.TripTime     = tripTime.ToArray();
            dataSetColumns.TripDistance = tripDistance.ToArray();
            dataSetColumns.FareAmount   = fareAmount.ToArray();
        }
        public static void FindCorrelations(DataSetColumns dataSetColumns)
        {
            var pcc = PearsonCoefficientCalculator.ComputeCoefficient(dataSetColumns.TripDistance, dataSetColumns.TripTime.Select(i => (double)i).ToArray());

            Console.WriteLine("Pearson coefficient between Time and Distance");
            Console.WriteLine(pcc);

            pcc = PearsonCoefficientCalculator.ComputeCoefficient(dataSetColumns.TripDistance, dataSetColumns.Riders.Select(i => (double)i).ToArray());
            Console.WriteLine("Pearson coefficient between Riders and Distance");
            Console.WriteLine(pcc);
        }
        /// <summary>
        /// This method reads the training data and calculates a variety of statistical data about each column.
        /// </summary>
        public static void UnderstandData(DataSetColumns dataSetColumns)
        {
            //Calculate and output the statistics for your pleasure
            var stats = MetricStatistics.CalculateMetricStatisticsAsync(dataSetColumns.Riders, DateTime.Now, TimeSpan.FromSeconds(1)).Result;

            Console.WriteLine("Rider Statistics:");
            Console.WriteLine(stats.ToString());
            stats = MetricStatistics.CalculateMetricStatisticsAsync(dataSetColumns.TripTime, DateTime.Now, TimeSpan.FromSeconds(1)).Result;
            Console.WriteLine("Trip Time Statistics:");
            Console.WriteLine(stats.ToString());
            stats = MetricStatistics.CalculateMetricStatisticsAsync(dataSetColumns.TripDistance, DateTime.Now, TimeSpan.FromSeconds(1)).Result;
            Console.WriteLine("Trip Distance Statistics:");
            Console.WriteLine(stats.ToString());
            stats = MetricStatistics.CalculateMetricStatisticsAsync(dataSetColumns.FareAmount, DateTime.Now, TimeSpan.FromSeconds(1)).Result;
            Console.WriteLine("Fare Amount Statistics:");
            Console.WriteLine(stats.ToString());
        }