Beispiel #1
0
 protected override StageResult Init()
 {
     if (TrainOp)
     {
         Contract.Requires(TrainingFile != null && TestFile == null);
         if (!TrainingFile.CheckExistsAndReportError(L))
         {
             return(StageResult.INPUT_ERROR);
         }
         if (!TestFile.CheckExistsAndReportError(L))
         {
             return(StageResult.INPUT_ERROR);
         }
         if (!ModelFileName.IsEmpty() && ModelFile.Exists && !OverwriteOutputFile)
         {
             Error("The model file {0} exists but the overwrite option was not specified.", ModelFile.FullName);
             return(StageResult.INPUT_ERROR);
         }
     }
     return(StageResult.SUCCESS);
 }
Beispiel #2
0
 public Classifier() : base()
 {
     Contract.Requires(!TrainingFileName.IsEmpty());
     Contract.Requires(!TestFileName.IsEmpty());
     Contract.Requires(!ModelFileName.IsEmpty());
 }