protected override void OnStart(IDictionary <SetType, List <Tomato> > imageSets) { //traning phase var trainSet = TomatoSetHelper.Expand(imageSets[SetType.TRANING]); classifier.Train(trainSet.Item1, trainSet.Item2, trainSet.Item3, trainSet.Item4); //load test images var testImages = new ImageLoaderHelper(base.ComputePath(this.indexName)); //the classifier predicts the class label for each image in the test set. var lines = ExportClassificationResult(classifier, testImages.Images); File.WriteAllLines(base.ComputePath("submission" + DateTime.Now.ToFileTime() + ".txt"), lines.ToArray()); log.LogNewLine("evaluation done, output in submission<timestamp>.txt"); }
private void Train(TomatoClassifier classifier, List <Tomato> tomatoes) { var adapted = TomatoSetHelper.Expand(tomatoes); classifier.Train(adapted.Item1, adapted.Item2, adapted.Item3, adapted.Item4); }