Example #1
0
        protected Performance.Performance runExperiment(Classifier.Classifier classifier, Parameter.Parameter parameter,
                                                        CrossValidation <Instance.Instance> crossValidation)
        {
            var trainSet = new InstanceList.InstanceList(crossValidation.GetTrainFold(0));
            var testSet  = new InstanceList.InstanceList(crossValidation.GetTestFold(0));

            return(classifier.SingleRun(parameter, trainSet, testSet));
        }
Example #2
0
 protected void RunExperiment(Classifier.Classifier classifier, Parameter.Parameter parameter,
                              ExperimentPerformance experimentPerformance, CrossValidation <Instance.Instance> crossValidation)
 {
     for (var i = 0; i < K; i++)
     {
         var trainSet = new InstanceList.InstanceList(crossValidation.GetTrainFold(i));
         var testSet  = new InstanceList.InstanceList(crossValidation.GetTestFold(i));
         classifier.Train(trainSet, parameter);
         experimentPerformance.Add(classifier.Test(testSet));
     }
 }