Java 类weka.core.neighboursearch.kdtrees.SlidingMidPointOfWidestSide 实例源码

项目:repo.kmeanspp.silhouette_score    文件:KDTree.java   
/**
 * Parses a given list of options. <p/>
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -S &lt;classname and options&gt;
 *  Node splitting method to use.
 *  (default: weka.core.neighboursearch.kdtrees.SlidingMidPointOfWidestSide)</pre>
 * 
 * <pre> -W &lt;value&gt;
 *  Set minimal width of a box
 *  (default: 1.0E-2).</pre>
 * 
 * <pre> -L
 *  Maximal number of instances in a leaf
 *  (default: 40).</pre>
 * 
 * <pre> -N
 *  Normalizing will be done
 *  (Select dimension for split, with normalising to universe).</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 {
  super.setOptions(options);

  String optionString = Utils.getOption('S', options);
  if (optionString.length() != 0) {
    String splitMethodSpec[] = Utils.splitOptions(optionString);
    if (splitMethodSpec.length == 0) {
      throw new Exception("Invalid DistanceFunction specification string.");
    }
    String className = splitMethodSpec[0];
    splitMethodSpec[0] = "";

    setNodeSplitter((KDTreeNodeSplitter) Utils.forName(
        KDTreeNodeSplitter.class, className, splitMethodSpec));
  }
  else {
    setNodeSplitter(new SlidingMidPointOfWidestSide());
  }

  optionString = Utils.getOption('W', options);
  if (optionString.length() != 0)
    setMinBoxRelWidth(Double.parseDouble(optionString));
  else
    setMinBoxRelWidth(1.0E-2);

  optionString = Utils.getOption('L', options);
  if (optionString.length() != 0)
    setMaxInstInLeaf(Integer.parseInt(optionString));
  else
    setMaxInstInLeaf(40);

  setNormalizeNodeWidth(Utils.getFlag('N', options));

  Utils.checkForRemainingOptions(options);
}
项目:autoweka    文件:KDTree.java   
/**
 * Parses a given list of options. <p/>
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -S &lt;classname and options&gt;
 *  Node splitting method to use.
 *  (default: weka.core.neighboursearch.kdtrees.SlidingMidPointOfWidestSide)</pre>
 * 
 * <pre> -W &lt;value&gt;
 *  Set minimal width of a box
 *  (default: 1.0E-2).</pre>
 * 
 * <pre> -L
 *  Maximal number of instances in a leaf
 *  (default: 40).</pre>
 * 
 * <pre> -N
 *  Normalizing will be done
 *  (Select dimension for split, with normalising to universe).</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 {
  super.setOptions(options);

  String optionString = Utils.getOption('S', options);
  if (optionString.length() != 0) {
    String splitMethodSpec[] = Utils.splitOptions(optionString);
    if (splitMethodSpec.length == 0) {
      throw new Exception("Invalid DistanceFunction specification string.");
    }
    String className = splitMethodSpec[0];
    splitMethodSpec[0] = "";

    setNodeSplitter((KDTreeNodeSplitter) Utils.forName(
        KDTreeNodeSplitter.class, className, splitMethodSpec));
  }
  else {
    setNodeSplitter(new SlidingMidPointOfWidestSide());
  }

  optionString = Utils.getOption('W', options);
  if (optionString.length() != 0)
    setMinBoxRelWidth(Double.parseDouble(optionString));
  else
    setMinBoxRelWidth(1.0E-2);

  optionString = Utils.getOption('L', options);
  if (optionString.length() != 0)
    setMaxInstInLeaf(Integer.parseInt(optionString));
  else
    setMaxInstInLeaf(40);

  setNormalizeNodeWidth(Utils.getFlag('N', options));
}
项目:umple    文件:KDTree.java   
/**
 * Parses a given list of options. <p/>
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -S &lt;classname and options&gt;
 *  Node splitting method to use.
 *  (default: weka.core.neighboursearch.kdtrees.SlidingMidPointOfWidestSide)</pre>
 * 
 * <pre> -W &lt;value&gt;
 *  Set minimal width of a box
 *  (default: 1.0E-2).</pre>
 * 
 * <pre> -L
 *  Maximal number of instances in a leaf
 *  (default: 40).</pre>
 * 
 * <pre> -N
 *  Normalizing will be done
 *  (Select dimension for split, with normalising to universe).</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 {
  super.setOptions(options);

  String optionString = Utils.getOption('S', options);
  if (optionString.length() != 0) {
    String splitMethodSpec[] = Utils.splitOptions(optionString);
    if (splitMethodSpec.length == 0) {
      throw new Exception("Invalid DistanceFunction specification string.");
    }
    String className = splitMethodSpec[0];
    splitMethodSpec[0] = "";

    setNodeSplitter((KDTreeNodeSplitter) Utils.forName(
        KDTreeNodeSplitter.class, className, splitMethodSpec));
  }
  else {
    setNodeSplitter(new SlidingMidPointOfWidestSide());
  }

  optionString = Utils.getOption('W', options);
  if (optionString.length() != 0)
    setMinBoxRelWidth(Double.parseDouble(optionString));
  else
    setMinBoxRelWidth(1.0E-2);

  optionString = Utils.getOption('L', options);
  if (optionString.length() != 0)
    setMaxInstInLeaf(Integer.parseInt(optionString));
  else
    setMaxInstInLeaf(40);

  setNormalizeNodeWidth(Utils.getFlag('N', options));

  Utils.checkForRemainingOptions(options);
}
项目:jbossBA    文件:KDTree.java   
/**
 * Parses a given list of options. <p/>
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -S &lt;classname and options&gt;
 *  Node splitting method to use.
 *  (default: weka.core.neighboursearch.kdtrees.SlidingMidPointOfWidestSide)</pre>
 * 
 * <pre> -W &lt;value&gt;
 *  Set minimal width of a box
 *  (default: 1.0E-2).</pre>
 * 
 * <pre> -L
 *  Maximal number of instances in a leaf
 *  (default: 40).</pre>
 * 
 * <pre> -N
 *  Normalizing will be done
 *  (Select dimension for split, with normalising to universe).</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 {
  super.setOptions(options);

  String optionString = Utils.getOption('S', options);
  if (optionString.length() != 0) {
    String splitMethodSpec[] = Utils.splitOptions(optionString);
    if (splitMethodSpec.length == 0) {
      throw new Exception("Invalid DistanceFunction specification string.");
    }
    String className = splitMethodSpec[0];
    splitMethodSpec[0] = "";

    setNodeSplitter((KDTreeNodeSplitter) Utils.forName(
        KDTreeNodeSplitter.class, className, splitMethodSpec));
  }
  else {
    setNodeSplitter(new SlidingMidPointOfWidestSide());
  }

  optionString = Utils.getOption('W', options);
  if (optionString.length() != 0)
    setMinBoxRelWidth(Double.parseDouble(optionString));
  else
    setMinBoxRelWidth(1.0E-2);

  optionString = Utils.getOption('L', options);
  if (optionString.length() != 0)
    setMaxInstInLeaf(Integer.parseInt(optionString));
  else
    setMaxInstInLeaf(40);

  setNormalizeNodeWidth(Utils.getFlag('N', options));
}