private Problem LoadData(bool withScaling = false)
        {
            var             file    = Path.Combine(TestContext.CurrentContext.TestDirectory, @".\Data\data.arff");
            var             arff    = ArffDataSet.Load <PositivityType>(file);
            IProblemFactory factory = new ProblemFactory(arff);

            if (withScaling)
            {
                factory = factory.WithRangeScaling();
            }

            return(factory.Construct(arff).GetProblem());
        }
        public void Setup()
        {
            training = new Mock <ITrainingModel>();
            var scheduler = new ConcurrentExclusiveSchedulerPair(TaskScheduler.Default, 2)
                            .ConcurrentScheduler;

            taskFactory = new TaskFactory(scheduler);
            parameters  = new GridSearchParameters(5, new double[] { 1, 2, 3, 4 }, new double[] { 1, 2, 3, 4 }, new Parameter());
            instance    = new GridParameterSelection(taskFactory, training.Object, parameters);

            var dataSet = ArffDataSet.CreateSimple("Test");

            dataSet.Header.RegisterNominalClass("One", "Two", "Three");
            dataSet.UseTotal = true;
            var one = dataSet.AddDocument();

            one.Class.Value = "One";
            one.AddRecord("Good");
            IProblemFactory factory = new ProblemFactory(dataSet);

            problem    = factory.Construct(dataSet).GetProblem();
            resetEvent = new ManualResetEvent(false);
        }