Examples of CategoricalNode


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

 
  @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);
View Full Code Here

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

      for (int index = 0; index < values.length; index++) {
        Data subset = data.subset(Condition.equals(best.attr, values[index]));
        childs[index] = build(rng, subset);
      }
     
      childNode = new CategoricalNode(best.attr, values, childs);
     
      if (!alreadySelected) {
        selected[best.attr] = false;
      }
    }
View Full Code Here

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

      for (int index = 0; index < values.length; index++) {
        Data subset = data.subset(Condition.equals(best.getAttr(), values[index]));
        children[index] = build(rng, subset);
      }
     
      childNode = new CategoricalNode(best.getAttr(), values, children);
     
      if (!alreadySelected) {
        selected[best.getAttr()] = false;
      }
    }
View Full Code Here

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

      for (int index = 0; index < values.length; index++) {
        Data subset = data.subset(Condition.equals(best.attr, values[index]));
        childs[index] = build(rng, subset);
      }

      return new CategoricalNode(best.attr, values, childs);
    }
  }
View Full Code Here

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

        children[index] = build(rng, subset);
      }

      selected[best.getAttr()] = alreadySelected;
     
      childNode = new CategoricalNode(best.getAttr(), values, children);
    }
   
    return childNode;
  }
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.