Examples of NumericalNode


Examples of org.apache.mahout.classifier.df.node.NumericalNode

  }
 
  @Test
  public void testForestVisualize() throws Exception {
    // Tree
    NumericalNode root = new NumericalNode(2, 90, new Leaf(0),
        new CategoricalNode(0, new double[] {0, 1, 2}, new Node[] {
            new NumericalNode(1, 71, new Leaf(0), new Leaf(1)), new Leaf(1),
            new Leaf(0)}));
    List<Node> trees = Lists.newArrayList();
    trees.add(root);

    // Forest
View Full Code Here

Examples of org.apache.mahout.df.node.NumericalNode

      Node loChild = build(rng, loSubset);
     
      Data hiSubset = data.subset(Condition.greaterOrEquals(best.attr, best.split));
      Node hiChild = build(rng, hiSubset);
     
      childNode = new NumericalNode(best.attr, best.split, loChild, hiChild);
    } else { // CATEGORICAL attribute
      selected[best.attr] = true;
     
      double[] values = data.values(best.attr);
      Node[] childs = new Node[values.length];
View Full Code Here

Examples of org.apache.mahout.df.node.NumericalNode

      Node loChild = build(rng, loSubset);
     
      Data hiSubset = data.subset(Condition.greaterOrEquals(best.getAttr(), best.getSplit()));
      Node hiChild = build(rng, hiSubset);
     
      childNode = new NumericalNode(best.getAttr(), best.getSplit(), loChild, hiChild);
    } else { // CATEGORICAL attribute
      selected[best.getAttr()] = true;
     
      double[] values = data.values(best.getAttr());
      Node[] children = new Node[values.length];
View Full Code Here

Examples of org.apache.mahout.df.node.NumericalNode

      Data hiSubset = data.subset(Condition.greaterOrEquals(best.attr,
          best.split));
      Node hiChild = build(rng, hiSubset);

      return new NumericalNode(best.attr, best.split, loChild, hiChild);
    } else { // CATEGORICAL attribute
      double[] values = data.values(best.attr);
      Node[] childs = new Node[values.length];

      for (int index = 0; index < values.length; index++) {
View Full Code Here

Examples of org.apache.mahout.df.node.NumericalNode

        selected = temp;
      } else {
        selected[best.getAttr()] = alreadySelected;
      }

      childNode = new NumericalNode(best.getAttr(), best.getSplit(), loChild, hiChild);
    } else { // CATEGORICAL attribute
      selected[best.getAttr()] = true;
     
      double[] values = data.values(best.getAttr());
      Node[] children = new Node[values.length];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.