public CrossValidationCommand(IHostEnvironment env, Arguments args)
     : base(env, args, RegistrationName)
 {
     Host.CheckUserArg(Args.NumFolds >= 2, nameof(Args.NumFolds), "Number of folds must be greater than or equal to 2.");
     TrainUtils.CheckTrainer(Host, args.Trainer, args.DataFile);
     Utils.CheckOptionalUserDirectory(Args.SummaryFilename, nameof(Args.SummaryFilename));
     Utils.CheckOptionalUserDirectory(Args.OutputDataFile, nameof(Args.OutputDataFile));
 }
예제 #2
0
 public TrainTestCommand(IHostEnvironment env, Arguments args)
     : base(env, args, nameof(TrainTestCommand))
 {
     Utils.CheckOptionalUserDirectory(args.SummaryFilename, nameof(args.SummaryFilename));
     Utils.CheckOptionalUserDirectory(args.OutputDataFile, nameof(args.OutputDataFile));
     TrainUtils.CheckTrainer(Host, args.Trainer, args.DataFile);
     if (string.IsNullOrWhiteSpace(args.TestFile))
     {
         throw Host.ExceptUserArg(nameof(args.TestFile), "Test file must be defined.");
     }
 }
예제 #3
0
        public TrainCommand(IHostEnvironment env, Arguments args)
            : base(env, args, nameof(TrainCommand))
        {
            Host.CheckNonWhiteSpace(args.OutputModelFile, nameof(args.OutputModelFile));
            TrainUtils.CheckTrainer(Host, args.Trainer, args.DataFile);
            _trainer = args.Trainer;

            _labelColumn   = args.LabelColumn;
            _featureColumn = args.FeatureColumn;
            _groupColumn   = args.GroupColumn;
            _weightColumn  = args.WeightColumn;
            _nameColumn    = args.NameColumn;
        }