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.");
     _info = TrainUtils.CheckTrainer(Host, args.Trainer, args.DataFile);
     Utils.CheckOptionalUserDirectory(Args.SummaryFilename, nameof(Args.SummaryFilename));
     Utils.CheckOptionalUserDirectory(Args.OutputDataFile, nameof(Args.OutputDataFile));
 }
 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));
     _info = TrainUtils.CheckTrainer(Host, args.Trainer, args.DataFile);
     if (string.IsNullOrWhiteSpace(args.TestFile))
     {
         throw Host.ExceptUserArg(nameof(args.TestFile), "Test file must be defined.");
     }
 }
Esempio n. 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;
        }