Пример #1
0
        public SimulateCommand()
        {
            base.Options = new Options();
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("file").WithDescription("path to the file with system runs.").Create("i"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("file").WithDescription("path to file with known judgments.").Create("j"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("name").WithDescription("name of the estimator to use.").Create("e"));
            base.Options.AddOption(OptionBuilder.Factory.HasArgs().WithArgName("name=value").WithDescription("optional parameter to the estimator.").Create("p"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("target").WithDescription("type of estimates to target ('rel' or 'abs').").Create('t'));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("num").WithDescription("number of batches that will be judged.").Create('b'));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("num").WithDescription("number of documents to judge per batch.").Create('n'));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("conf").WithDescription("optional target average confidence on the estimates (defaults to " + Allcea.DEFAULT_CONFIDENCE + ").").Create("c"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("size").WithDescription("optional target effect size to compute confidence (defaults to " + Allcea.DEFAULT_RELATIVE_SIZE + " for relative and " + Allcea.DEFAULT_ABSOLUTE_SIZE + " for absolute).").Create("s"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("digits").WithDescription("optional number of fractional digits to output (defaults to " + Allcea.DEFAULT_DECIMAL_DIGITS + ")").Create("d"));
            base.Options.AddOption(OptionBuilder.Factory.WithDescription("shows this help message.").Create("h"));

            this._inputPath = null;
            this._judgedPath = null;
            this._estimator = null;
            this._decimalDigits = Allcea.DEFAULT_DECIMAL_DIGITS;
            this._batchNum = Allcea.DEFAULT_NUMBER_OF_BATCHES;
            this._batchSize = Allcea.DEFAULT_BATCH_SIZE;
            this._confEstimator = null;
            this._target = EvaluationTargets.Relative;
            this._confidence = Allcea.DEFAULT_CONFIDENCE;
        }
Пример #2
0
        public SimulateCommand()
        {
            base.Options = new Options();
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("file").WithDescription("path to the file with system runs.").Create("i"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("file").WithDescription("path to file with known judgments.").Create("j"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("name").WithDescription("name of the estimator to use.").Create("e"));
            base.Options.AddOption(OptionBuilder.Factory.HasArgs().WithArgName("name=value").WithDescription("optional parameter to the estimator.").Create("p"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("target").WithDescription("type of estimates to target ('rel' or 'abs').").Create('t'));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("num").WithDescription("number of batches that will be judged.").Create('b'));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("num").WithDescription("number of documents to judge per batch.").Create('n'));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("conf").WithDescription("optional target average confidence on the estimates (defaults to " + Allcea.DEFAULT_CONFIDENCE + ").").Create("c"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("size").WithDescription("optional target effect size to compute confidence (defaults to " + Allcea.DEFAULT_RELATIVE_SIZE + " for relative and " + Allcea.DEFAULT_ABSOLUTE_SIZE + " for absolute).").Create("s"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("digits").WithDescription("optional number of fractional digits to output (defaults to " + Allcea.DEFAULT_DECIMAL_DIGITS + ")").Create("d"));
            base.Options.AddOption(OptionBuilder.Factory.WithDescription("shows this help message.").Create("h"));

            this._inputPath     = null;
            this._judgedPath    = null;
            this._estimator     = null;
            this._decimalDigits = Allcea.DEFAULT_DECIMAL_DIGITS;
            this._batchNum      = Allcea.DEFAULT_NUMBER_OF_BATCHES;
            this._batchSize     = Allcea.DEFAULT_BATCH_SIZE;
            this._confEstimator = null;
            this._target        = EvaluationTargets.Relative;
            this._confidence    = Allcea.DEFAULT_CONFIDENCE;
        }
Пример #3
0
        public EstimateCommand()
        {
            base.Options = new Options();
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("name").WithDescription("name of the estimator to use.").Create("e"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("file").WithDescription("path to the file with system runs.").Create("i"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("file").WithDescription("optional path to file with known judgments (will not be estimated).").Create("j"));
            base.Options.AddOption(OptionBuilder.Factory.HasArgs().WithArgName("name=value").WithDescription("optional parameter to the estimator.").Create("p"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("digits").WithDescription("optional number of fractional digits to output (defaults to " + Allcea.DEFAULT_DECIMAL_DIGITS + ")").Create("d"));
            base.Options.AddOption(OptionBuilder.Factory.WithDescription("shows this help message.").Create("h"));

            this._inputPath = null;
            this._judgedPath = null;
            this._estimator = null;
            this._decimalDigits = Allcea.DEFAULT_DECIMAL_DIGITS;
        }
Пример #4
0
        public EstimateCommand()
        {
            base.Options = new Options();
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("name").WithDescription("name of the estimator to use.").Create("e"));
            base.Options.AddOption(OptionBuilder.Factory.IsRequired().HasArg().WithArgName("file").WithDescription("path to the file with system runs.").Create("i"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("file").WithDescription("optional path to file with known judgments (will not be estimated).").Create("j"));
            base.Options.AddOption(OptionBuilder.Factory.HasArgs().WithArgName("name=value").WithDescription("optional parameter to the estimator.").Create("p"));
            base.Options.AddOption(OptionBuilder.Factory.HasArg().WithArgName("digits").WithDescription("optional number of fractional digits to output (defaults to " + Allcea.DEFAULT_DECIMAL_DIGITS + ")").Create("d"));
            base.Options.AddOption(OptionBuilder.Factory.WithDescription("shows this help message.").Create("h"));

            this._inputPath     = null;
            this._judgedPath    = null;
            this._estimator     = null;
            this._decimalDigits = Allcea.DEFAULT_DECIMAL_DIGITS;
        }
Пример #5
0
        public override void CheckOptions(CommandLine cmd)
        {
            // Double format
            if (cmd.HasOption('d'))
            {
                this._decimalDigits = AbstractCommand.CheckDigits(cmd.GetOptionValue('d'));
            }
            // Files
            this._inputPath  = AbstractCommand.CheckInputFile(cmd.GetOptionValue('i'));
            this._judgedPath = AbstractCommand.CheckJudgedFile(cmd.GetOptionValue('j'));
            // Estimator
            Dictionary <string, string> parameters = Allcea.ParseNameValueParameters(cmd.GetOptionValues('p'));

            this._estimator = new EstimatorWrapper(cmd.GetOptionValue('e'), parameters);
        }
Пример #6
0
        public override void CheckOptions(CommandLine cmd)
        {
            // Target and confidence estimator
            if (cmd.HasOption('c'))
            {
                this._confidence = AbstractCommand.CheckConfidence(cmd.GetOptionValue('c'));
            }
            this._target = AbstractCommand.CheckTarget(cmd.GetOptionValue('t'));
            double sizeRel = Allcea.DEFAULT_RELATIVE_SIZE;
            double sizeAbs = Allcea.DEFAULT_ABSOLUTE_SIZE;

            if (cmd.HasOption('s'))
            {
                switch (this._target)
                {
                case EvaluationTargets.Relative: sizeRel = AbstractCommand.CheckRelativeSize(cmd.GetOptionValue('s')); break;

                case EvaluationTargets.Absolute: sizeAbs = AbstractCommand.CheckAbsoluteSize(cmd.GetOptionValue('s')); break;
                }
            }
            this._confEstimator = new NormalConfidenceEstimator(this._confidence, sizeRel, sizeAbs);
            // Double format
            if (cmd.HasOption('d'))
            {
                this._decimalDigits = AbstractCommand.CheckDigits(cmd.GetOptionValue('d'));
            }
            // Batches
            this._batchNum  = AbstractCommand.CheckBatchNumber(cmd.GetOptionValue('b'));
            this._batchSize = AbstractCommand.CheckBatchSize(cmd.GetOptionValue('n'));
            // Files
            this._inputPath  = AbstractCommand.CheckInputFile(cmd.GetOptionValue('i'));
            this._judgedPath = AbstractCommand.CheckJudgedFile(cmd.GetOptionValue('j'));
            // Estimator
            Dictionary <string, string> parameters = Allcea.ParseNameValueParameters(cmd.GetOptionValues('p'));

            this._estimator = new EstimatorWrapper(cmd.GetOptionValue('e'), parameters);
        }
Пример #7
0
 public override void CheckOptions(CommandLine cmd)
 {
     // Double format
     if (cmd.HasOption('d')) {
         this._decimalDigits = AbstractCommand.CheckDigits(cmd.GetOptionValue('d'));
     }
     // Files
     this._inputPath = AbstractCommand.CheckInputFile(cmd.GetOptionValue('i'));
     if (cmd.HasOption('j')) {
         this._judgedPath = AbstractCommand.CheckJudgedFile(cmd.GetOptionValue('j'));
     }
     // Estimator
     Dictionary<string, string> parameters = Allcea.ParseNameValueParameters(cmd.GetOptionValues('p'));
     this._estimator = new EstimatorWrapper(cmd.GetOptionValue('e'), parameters);
 }
Пример #8
0
 public override void CheckOptions(CommandLine cmd)
 {
     // Target and confidence estimator
     if (cmd.HasOption('c')) {
         this._confidence = AbstractCommand.CheckConfidence(cmd.GetOptionValue('c'));
     }
     this._target = AbstractCommand.CheckTarget(cmd.GetOptionValue('t'));
     double sizeRel = Allcea.DEFAULT_RELATIVE_SIZE;
     double sizeAbs = Allcea.DEFAULT_ABSOLUTE_SIZE;
     if (cmd.HasOption('s')) {
         switch (this._target) {
             case EvaluationTargets.Relative: sizeRel = AbstractCommand.CheckRelativeSize(cmd.GetOptionValue('s')); break;
             case EvaluationTargets.Absolute: sizeAbs = AbstractCommand.CheckAbsoluteSize(cmd.GetOptionValue('s')); break;
         }
     }
     this._confEstimator = new NormalConfidenceEstimator(this._confidence, sizeRel, sizeAbs);
     // Double format
     if (cmd.HasOption('d')) {
         this._decimalDigits = AbstractCommand.CheckDigits(cmd.GetOptionValue('d'));
     }
     // Batches
     this._batchNum = AbstractCommand.CheckBatchNumber(cmd.GetOptionValue('b'));
     this._batchSize = AbstractCommand.CheckBatchSize(cmd.GetOptionValue('n'));
     // Files
     this._inputPath = AbstractCommand.CheckInputFile(cmd.GetOptionValue('i'));
     this._judgedPath = AbstractCommand.CheckJudgedFile(cmd.GetOptionValue('j'));
     // Estimator
     Dictionary<string, string> parameters = Allcea.ParseNameValueParameters(cmd.GetOptionValues('p'));
     this._estimator = new EstimatorWrapper(cmd.GetOptionValue('e'), parameters);
 }