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)); }
protected void RunExperiment(Classifier.Classifier classifier, Parameter.Parameter parameter, ExperimentPerformance experimentPerformance, CrossValidation <Instance.Instance> crossValidation, InstanceList.InstanceList testSet) { for (var i = 0; i < K; i++) { var trainSet = new InstanceList.InstanceList(crossValidation.GetTrainFold(i)); classifier.Train(trainSet, parameter); experimentPerformance.Add(classifier.Test(testSet)); } }