public void SupportVectorMachinePerformanceTest() {
      ex = null;

      var cv = new CrossValidation();
      cv.Algorithm = new SupportVectorRegression();
      var rand = new HeuristicLab.Random.MersenneTwister();
      double[,] data = GenerateData(1000, rand);
      List<string> variables = new List<string>() { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "y" };
      Dataset ds = new Dataset(variables, data);
      cv.Problem.ProblemDataParameter.ActualValue = new RegressionProblemData(ds, variables.Take(10), variables.Last());
      cv.Folds.Value = 5;
      cv.SamplesStart.Value = 0;
      cv.SamplesEnd.Value = 999;

      cv.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(cv_ExceptionOccurred);
      cv.Stopped += new EventHandler(cv_Stopped);

      cv.Prepare();
      cv.Start();
      trigger.WaitOne();
      if (ex != null) throw ex;

      TestContext.WriteLine("Runtime: {0}", cv.ExecutionTime.ToString());

    }
        public void SupportVectorMachinePerformanceTest()
        {
            ex = null;

            var cv = new CrossValidation();

            cv.Algorithm = new SupportVectorRegression();
            var rand = new HeuristicLab.Random.MersenneTwister();

            double[,] data = GenerateData(1000, rand);
            List <string> variables = new List <string>()
            {
                "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "y"
            };
            Dataset ds = new Dataset(variables, data);

            cv.Problem.ProblemDataParameter.ActualValue = new RegressionProblemData(ds, variables.Take(10), variables.Last());
            cv.Folds.Value        = 5;
            cv.SamplesStart.Value = 0;
            cv.SamplesEnd.Value   = 999;

            cv.ExceptionOccurred += new EventHandler <EventArgs <Exception> >(cv_ExceptionOccurred);

            cv.Prepare();
            cv.Start();
            if (ex != null)
            {
                throw ex;
            }

            TestContext.WriteLine("Runtime: {0}", cv.ExecutionTime.ToString());
        }