Пример #1
0
        /// <summary>
        /// Run a train unit test
        /// </summary>
        public InternalLearnRunParameters TrainForIniModel(
            PredictorAndArgs predictor,
            string trainDataset,
            string outName,
            string[] extra = null,
            ModelType.ModelKind modelKind = ModelType.ModelKind.Model)
        {
            InternalLearnRunParameters runParams = new InternalLearnRunParameters
            {
                Command          = "Train",
                Trainer          = predictor.Trainer,
                Dataset          = trainDataset,
                BaselineDir      = IniSubDirectory,
                BaselineFilename = outName,
                ModelFilename    = outName + ModelType.GetModelType(modelKind).ModelExtension,
                ModelType        = ModelType.GetModelType(modelKind),
                extraArgs        = extra,
                NoTest           = true,
            };

            RunPredictor(runParams);
            return(runParams);
        }
Пример #2
0
 /// <summary>
 /// Run Train for a single predictor on a single dataset.
 /// </summary>
 protected RunContext RunOneTrain(PredictorAndArgs predictor, TestDataset dataset,
                                  string[] extraSettings = null, string extraTag = "")
 {
     Contracts.Assert(IsActive);
     return(Run_Train(predictor, dataset, extraSettings, extraTag));
 }