public override void CheckOptions(CommandLine cmd) { // Confidence estimator double confidence = Allcea.DEFAULT_CONFIDENCE; double sizeRel = Allcea.DEFAULT_RELATIVE_SIZE; double sizeAbs = Allcea.DEFAULT_ABSOLUTE_SIZE; if (cmd.HasOption('c')) { confidence = AbstractCommand.CheckConfidence(cmd.GetOptionValue('c')); } if (cmd.HasOption('s')) { string[] sizeStrings = cmd.GetOptionValues('s'); if (sizeStrings.Length != 2) { throw new ArgumentException("Must provide two target effect sizes: relative and absolute."); } sizeRel = AbstractCommand.CheckRelativeSize(sizeStrings[0]); sizeAbs = AbstractCommand.CheckAbsoluteSize(sizeStrings[1]); } this._confEstimator = new NormalConfidenceEstimator(confidence, sizeRel, sizeAbs); // 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')); } this._estimatedPath = AbstractCommand.CheckEstimatedFile(cmd.GetOptionValue('e')); }
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); }
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); }