当前位置: 首页>>代码示例>>Java>>正文


Java Utils.checkForRemainingOptions方法代码示例

本文整理汇总了Java中weka.core.Utils.checkForRemainingOptions方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.checkForRemainingOptions方法的具体用法?Java Utils.checkForRemainingOptions怎么用?Java Utils.checkForRemainingOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在weka.core.Utils的用法示例。


在下文中一共展示了Utils.checkForRemainingOptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
@Override
public void setOptions(String[] options) throws Exception {

  m_encodeMissingAsZero = Utils.getFlag('M', options);
  m_insertDummyNominalFirstValue = Utils.getFlag('F', options);

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:9,代码来源:NonSparseToSparse.java

示例2: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
  * Parses a given list of options. <p/>
  *
  <!-- options-start -->
  * Valid options are: <p/>
  * 
  * <pre> -B &lt;num&gt;
  *  Manual blend setting (default 20%)
  * </pre>
  * 
  * <pre> -E
  *  Enable entropic auto-blend setting (symbolic class only)
  * </pre>
  * 
  * <pre> -M &lt;char&gt;
  *  Specify the missing value treatment mode (default a)
  *  Valid options are: a(verage), d(elete), m(axdiff), n(ormal)
  * </pre>
  * 
  <!-- options-end -->
  *
  * @param options the list of options as an array of strings
  * @throws Exception if an option is not supported
  */
 public void setOptions(String[] options) throws Exception {
   
   String blendStr = Utils.getOption('B', options);
   if (blendStr.length() != 0) {
     setGlobalBlend(Integer.parseInt(blendStr));
   }

   setEntropicAutoBlend(Utils.getFlag('E', options));
   
   String missingModeStr = Utils.getOption('M', options);
   if (missingModeStr.length() != 0) {
     switch ( missingModeStr.charAt(0) ) {
     case 'a':
setMissingMode(new SelectedTag(M_AVERAGE, TAGS_MISSING));
break;
     case 'd':
setMissingMode(new SelectedTag(M_DELETE, TAGS_MISSING));
break;
     case 'm':
setMissingMode(new SelectedTag(M_MAXDIFF, TAGS_MISSING));
break;
     case 'n':
setMissingMode(new SelectedTag(M_NORMAL, TAGS_MISSING));
break;
     default:
setMissingMode(new SelectedTag(M_AVERAGE, TAGS_MISSING));
     }
   }
   
   super.setOptions(options);
   
   Utils.checkForRemainingOptions(options);
 }
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:58,代码来源:KStar.java

示例3: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -C &lt;col&gt;
 *  Sets the attribute index (default last).
 * </pre>
 * 
 * <pre>
 * -F &lt;value index&gt;
 *  Sets the first value's index (default first).
 * </pre>
 * 
 * <pre>
 * -S &lt;value index&gt;
 *  Sets the second value's index (default last).
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  String attIndex = Utils.getOption('C', options);
  if (attIndex.length() != 0) {
    setAttributeIndex(attIndex);
  } else {
    setAttributeIndex("last");
  }

  String firstValIndex = Utils.getOption('F', options);
  if (firstValIndex.length() != 0) {
    setFirstValueIndex(firstValIndex);
  } else {
    setFirstValueIndex("first");
  }

  String secondValIndex = Utils.getOption('S', options);
  if (secondValIndex.length() != 0) {
    setSecondValueIndex(secondValIndex);
  } else {
    setSecondValueIndex("last");
  }

  if (getInputFormat() != null) {
    setInputFormat(getInputFormat());
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:58,代码来源:SwapValues.java

示例4: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -T &lt;nominal|numeric|string|date|relational&gt;
 *  Attribute type to delete. Valid options are "nominal", 
 *  "numeric", "string", "date" and "relational".
 *  (default "string")
 * </pre>
 * 
 * <pre>
 * -V
 *  Invert matching sense (i.e. only keep specified columns)
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  String tString = Utils.getOption('T', options);
  if (tString.length() != 0) {
    setAttributeTypeString(tString);
  }
  setInvertSelection(Utils.getFlag('V', options));

  if (getInputFormat() != null) {
    setInputFormat(getInputFormat());
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:40,代码来源:RemoveType.java

示例5: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -C &lt;col&gt;
 *  Sets the attribute index.
 * </pre>
 * 
 * <pre>
 * -V &lt;index1,index2-index4,...&gt;
 *  Specify the list of values to indicate. First and last are
 *  valid indexes (default last)
 * </pre>
 * 
 * <pre>
 * -N &lt;index&gt;
 *  Set if new boolean attribute nominal.
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  String attIndex = Utils.getOption('C', options);
  if (attIndex.length() != 0) {
    setAttributeIndex(attIndex);
  } else {
    setAttributeIndex("last");
  }

  String valIndex = Utils.getOption('V', options);
  if (valIndex.length() != 0) {
    setValueIndices(valIndex);
  } else {
    setValueIndices("last");
  }

  setNumeric(!Utils.getFlag('N', options));

  if (getInputFormat() != null) {
    setInputFormat(getInputFormat());
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:54,代码来源:MakeIndicator.java

示例6: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses the options for this object.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -i &lt;the input file&gt;
 *  The input file
 * </pre>
 * 
 * <pre>
 * -o &lt;the output file&gt;
 *  The output file
 * </pre>
 * 
 * <pre>
 * -C &lt;class index&gt;
 *  The class index (first and last are valid as well).
 *  (default: last)
 * </pre>
 * 
 * <pre>
 * -compress
 *  Compresses the data (uses '.json.gz' as extension instead of '.json')
 *  (default: off)
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the options to use
 * @throws Exception if setting of options fails
 */
@Override
public void setOptions(String[] options) throws Exception {
  String tmpStr;

  tmpStr = Utils.getOption('C', options);
  if (tmpStr.length() != 0) {
    setClassIndex(tmpStr);
  } else {
    setClassIndex("last");
  }

  setCompressOutput(Utils.getFlag("compress", options));

  super.setOptions(options);

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:52,代码来源:JSONSaver.java

示例7: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
  * Parses a given list of options. <p/>
  *
  <!-- options-start -->
  * Valid options are: <p/>
  * 
  * <pre> -X &lt;number of folds&gt;
  *  Number of folds used for cross validation (default 10).</pre>
  * 
  * <pre> -P &lt;classifier parameter&gt;
  *  Classifier parameter options.
  *  eg: "N 1 5 10" Sets an optimisation parameter for the
  *  classifier with name -N, with lower bound 1, upper bound
  *  5, and 10 optimisation steps. The upper bound may be the
  *  character 'A' or 'I' to substitute the number of
  *  attributes or instances in the training data,
  *  respectively. This parameter may be supplied more than
  *  once to optimise over several classifier options
  *  simultaneously.</pre>
  * 
  * <pre> -S &lt;num&gt;
  *  Random number seed.
  *  (default 1)</pre>
  * 
  * <pre> -D
  *  If set, classifier is run in debug mode and
  *  may output additional info to the console</pre>
  * 
  * <pre> -W
  *  Full name of base classifier.
  *  (default: weka.classifiers.rules.ZeroR)</pre>
  * 
  * <pre> 
  * Options specific to classifier weka.classifiers.rules.ZeroR:
  * </pre>
  * 
  * <pre> -D
  *  If set, classifier is run in debug mode and
  *  may output additional info to the console</pre>
  * 
  <!-- options-end -->
  *
  * Options after -- are passed to the designated sub-classifier. <p>
  *
  * @param options the list of options as an array of strings
  * @throws Exception if an option is not supported
  */
 public void setOptions(String[] options) throws Exception {

   String foldsString = Utils.getOption('X', options);
   if (foldsString.length() != 0) {
     setNumFolds(Integer.parseInt(foldsString));
   } else {
     setNumFolds(10);
   }

   String cvParam;
   m_CVParams = new Vector<CVParameter>();
   do {
     cvParam = Utils.getOption('P', options);
     if (cvParam.length() != 0) {
addCVParameter(cvParam);
     }
   } while (cvParam.length() != 0);

   super.setOptions(options);
   
   Utils.checkForRemainingOptions(options);
 }
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:70,代码来源:CVParameterSelection.java

示例8: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -K
 *  Use kernel density estimator rather than normal
 *  distribution for numeric attributes
 * </pre>
 * 
 * <pre>
 * -D
 *  Use supervised discretization to process numeric attributes
 * </pre>
 * 
 * <pre>
 * -O
 *  Display model in old format (good when there are many classes)
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @exception Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  super.setOptions(options);
  boolean k = Utils.getFlag('K', options);
  boolean d = Utils.getFlag('D', options);
  if (k && d) {
    throw new IllegalArgumentException("Can't use both kernel density "
      + "estimation and discretization!");
  }
  setUseSupervisedDiscretization(d);
  setUseKernelEstimator(k);
  setDisplayModelInOldFormat(Utils.getFlag('O', options));
  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:44,代码来源:NaiveBayes.java

示例9: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -E &lt;expression&gt;
 *  Specify the expression to apply. Eg a1^2*a5/log(a7*4.0).
 *  Supported opperators: ,+, -, *, /, ^, log, abs, cos, 
 *  exp, sqrt, floor, ceil, rint, tan, sin, (, )
 *  (default: a1^2)
 * </pre>
 * 
 * <pre>
 * -N &lt;name&gt;
 *  Specify the name for the new attribute. (default is the expression provided with -E)
 * </pre>
 * 
 * <pre>
 * -D
 *  Debug. Names attribute with the postfix parse of the expression.
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {
  String expString = Utils.getOption('E', options);
  if (expString.length() != 0) {
    setExpression(expString);
  } else {
    setExpression("a1^2");
  }

  String name = Utils.getOption('N', options);
  if (name.length() != 0) {
    setName(name);
  }

  setDebug(Utils.getFlag('D', options));

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:49,代码来源:AddExpression.java

示例10: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 *
 * <!-- options-start --> Valid options are:
 * <p/>
 *
 * <pre>
 * -W &lt;class name&gt;
 *  The full class name of the classifier.
 *  eg: weka.classifiers.bayes.NaiveBayes
 * </pre>
 *
 * <pre>
 * -C &lt;index&gt;
 *  The index of the class for which IR statistics
 *  are to be output. (default 1)
 * </pre>
 *
 * <pre>
 * -I &lt;index&gt;
 *  The index of an attribute to output in the
 *  results. This attribute should identify an
 *  instance in order to know which instances are
 *  in the test set of a cross validation. if 0
 *  no output (default 0).
 * </pre>
 *
 * <pre>
 * -P
 *  Add target and prediction columns to the result
 *  for each fold.
 * </pre>
 *
 * <pre>
 * Options specific to classifier weka.classifiers.rules.ZeroR:
 * </pre>
 *
 * <pre>
 * -D
 *  If set, classifier is run in debug mode and
 *  may output additional info to the console
 * </pre>
 *
 * <pre>
 * -D &lt;directory&gt;
 *  Name of a directory to search for cost files when loading
 *  costs on demand (default current directory).
 * </pre>
 *
 * <!-- options-end -->
 *
 * All options after -- will be passed to the classifier.
 *
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  String demandDir = Utils.getOption('D', options);
  if (demandDir.length() != 0) {
    setOnDemandDirectory(new File(demandDir));
  }

  super.setOptions(options);

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:70,代码来源:CostSensitiveClassifierSplitEvaluator.java

示例11: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses the options for this object.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -i &lt;the input file&gt;
 *  The input file
 * </pre>
 * 
 * <pre>
 * -o &lt;the output file&gt;
 *  The output file
 * </pre>
 * 
 * <pre>
 * -compress
 *  Compresses the data (uses '.arff.gz' as extension instead of '.arff')
 *  (default: off)
 * </pre>
 * 
 * <pre>
 * -decimal &lt;num&gt;
 *  The maximum number of digits to print after the decimal
 *  place for numeric values (default: 6)
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the options to use
 * @throws Exception if setting of options fails
 */
@Override
public void setOptions(String[] options) throws Exception {

  setCompressOutput(Utils.getFlag("compress", options));

  String tmpStr = Utils.getOption("decimal", options);
  if (tmpStr.length() > 0) {
    setMaxDecimalPlaces(Integer.parseInt(tmpStr));
  }

  super.setOptions(options);

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:49,代码来源:ArffSaver.java

示例12: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -S &lt;num&gt;
 *  Specify the random number seed (default 1)
 * </pre>
 * 
 * <pre>
 * -Z &lt;num&gt;
 *  The size of the output dataset, as a percentage of
 *  the input dataset (default 100)
 * </pre>
 * 
 * <pre>
 * -no-replacement
 *  Disables replacement of instances
 *  (default: with replacement)
 * </pre>
 * 
 * <pre>
 * -V
 *  Inverts the selection - only available with '-no-replacement'.
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  String tmpStr = Utils.getOption('S', options);
  if (tmpStr.length() != 0) {
    setRandomSeed(Integer.parseInt(tmpStr));
  } else {
    setRandomSeed(1);
  }

  tmpStr = Utils.getOption('Z', options);
  if (tmpStr.length() != 0) {
    setSampleSizePercent(Double.parseDouble(tmpStr));
  } else {
    setSampleSizePercent(100);
  }

  setNoReplacement(Utils.getFlag("no-replacement", options));

  if (getNoReplacement()) {
    setInvertSelection(Utils.getFlag('V', options));
  }

  if (getInputFormat() != null) {
    setInputFormat(getInputFormat());
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:64,代码来源:Resample.java

示例13: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -V
 *  Specifies if inverse of selection is to be output.
 * </pre>
 * 
 * <pre>
 * -N &lt;number of folds&gt;
 *  Specifies number of folds dataset is split into. 
 *  (default 10)
 * </pre>
 * 
 * <pre>
 * -F &lt;fold&gt;
 *  Specifies which fold is selected. (default 1)
 * </pre>
 * 
 * <pre>
 * -S &lt;seed&gt;
 *  Specifies random number seed. (default 0, no randomizing)
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  setInvertSelection(Utils.getFlag('V', options));
  String numFolds = Utils.getOption('N', options);
  if (numFolds.length() != 0) {
    setNumFolds(Integer.parseInt(numFolds));
  } else {
    setNumFolds(10);
  }
  String fold = Utils.getOption('F', options);
  if (fold.length() != 0) {
    setFold(Integer.parseInt(fold));
  } else {
    setFold(1);
  }
  String seed = Utils.getOption('S', options);
  if (seed.length() != 0) {
    setSeed(Integer.parseInt(seed));
  } else {
    setSeed(0);
  }
  if (getInputFormat() != null) {
    setInputFormat(getInputFormat());
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:62,代码来源:StratifiedRemoveFolds.java

示例14: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -C &lt;col&gt;
 *  Index of the attribute to be changed 
 *  (default last attribute)
 * </pre>
 * 
 * <pre>
 * -M
 *  Treat missing values as an extra value
 * </pre>
 * 
 * <pre>
 * -P &lt;num&gt;
 *  Specify the percentage of noise introduced 
 *  to the data (default 10)
 * </pre>
 * 
 * <pre>
 * -S &lt;num&gt;
 *  Specify the random number seed (default 1)
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {

  String indexString = Utils.getOption('C', options);
  if (indexString.length() != 0) {
    setAttributeIndex(indexString);
  } else {
    setAttributeIndex("last");
  }

  if (Utils.getFlag('M', options)) {
    setUseMissing(true);
  }

  String percentString = Utils.getOption('P', options);
  if (percentString.length() != 0) {
    setPercent((int) Double.valueOf(percentString).doubleValue());
  } else {
    setPercent(10);
  }

  String seedString = Utils.getOption('S', options);
  if (seedString.length() != 0) {
    setRandomSeed(Integer.parseInt(seedString));
  } else {
    setRandomSeed(1);
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:65,代码来源:AddNoise.java

示例15: setOptions

import weka.core.Utils; //导入方法依赖的package包/类
/**
 * Parses a given list of options.
 * <p/>
 * 
 * <!-- options-start --> Valid options are:
 * <p/>
 * 
 * <pre>
 * -C &lt;num&gt;
 *  Choose attribute to be used for selection.
 * </pre>
 * 
 * <pre>
 * -N &lt;num&gt;
 *  Number of values to retain for the sepcified attribute, 
 *  i.e. the ones with the most instances (default 2).
 * </pre>
 * 
 * <pre>
 * -L
 *  Instead of values with the most instances the ones with the 
 *  least are retained.
 * </pre>
 * 
 * <pre>
 * -H
 *  When selecting on nominal attributes, removes header
 *  references to excluded values.
 * </pre>
 * 
 * <pre>
 * -V
 *  Invert matching sense.
 * </pre>
 * 
 * <!-- options-end -->
 * 
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
@Override
public void setOptions(String[] options) throws Exception {
  String attIndex = Utils.getOption('C', options);
  if (attIndex.length() != 0) {
    setAttributeIndex(attIndex);
  } else {
    setAttributeIndex("last");
  }

  String numValues = Utils.getOption('N', options);
  if (numValues.length() != 0) {
    setNumValues(Integer.parseInt(numValues));
  } else {
    setNumValues(2);
  }

  setUseLeastValues(Utils.getFlag('L', options));

  setModifyHeader(Utils.getFlag('H', options));

  setInvertSelection(Utils.getFlag('V', options));

  if (getInputFormat() != null) {
    setInputFormat(getInputFormat());
  }

  Utils.checkForRemainingOptions(options);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:69,代码来源:RemoveFrequentValues.java


注:本文中的weka.core.Utils.checkForRemainingOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。