public void load(XGBoostDataInput input) throws IOException { this.num_trees = input.readInt(); this.num_roots = input.readInt(); this.num_feature = input.readInt(); input.readReserved(3); this.num_output_group = input.readInt(); this.size_leaf_vector = input.readInt(); input.readReserved(32); this.trees = new ArrayList<>(); for(int i = 0; i < this.num_trees; i++){ RegTree tree = new RegTree(); tree.load(input); this.trees.add(tree); } this.tree_info = new int[this.num_trees]; for(int i = 0; i < this.num_trees; i++){ this.tree_info[i] = input.readInt(); } }
TreeModel treeModel = regTree.encodeTreeModel(predicateManager, segmentSchema);
public TreeModel encodeTreeModel(PredicateManager predicateManager, Schema schema){ org.dmg.pmml.tree.Node root = encodeNode(new True(), predicateManager, 0, schema); TreeModel treeModel = new TreeModel(MiningFunction.REGRESSION, ModelUtil.createMiningSchema(schema.getLabel()), root) .setSplitCharacteristic(TreeModel.SplitCharacteristic.BINARY_SPLIT) .setMissingValueStrategy(TreeModel.MissingValueStrategy.DEFAULT_CHILD) .setMathContext(MathContext.FLOAT); return treeModel; }
public TreeModel encodeTreeModel(PredicateManager predicateManager, Schema schema){ org.dmg.pmml.tree.Node root = encodeNode(new True(), predicateManager, 0, schema); TreeModel treeModel = new TreeModel(MiningFunction.REGRESSION, ModelUtil.createMiningSchema(schema.getLabel()), root) .setSplitCharacteristic(TreeModel.SplitCharacteristic.BINARY_SPLIT) .setMissingValueStrategy(TreeModel.MissingValueStrategy.DEFAULT_CHILD) .setMathContext(MathContext.FLOAT); return treeModel; }
public void load(XGBoostDataInput input) throws IOException { this.num_trees = input.readInt(); this.num_roots = input.readInt(); this.num_feature = input.readInt(); input.readReserved(3); this.num_output_group = input.readInt(); this.size_leaf_vector = input.readInt(); input.readReserved(32); this.trees = new ArrayList<>(); for(int i = 0; i < this.num_trees; i++){ RegTree tree = new RegTree(); tree.load(input); this.trees.add(tree); } this.tree_info = new int[this.num_trees]; for(int i = 0; i < this.num_trees; i++){ this.tree_info[i] = input.readInt(); } }
org.dmg.pmml.tree.Node leftChild = encodeNode(leftPredicate, predicateManager, node.cleft(), schema); org.dmg.pmml.tree.Node rightChild = encodeNode(rightPredicate, predicateManager, node.cright(), schema);
TreeModel treeModel = regTree.encodeTreeModel(predicateManager, segmentSchema);
org.dmg.pmml.tree.Node leftChild = encodeNode(leftPredicate, predicateManager, node.cleft(), schema); org.dmg.pmml.tree.Node rightChild = encodeNode(rightPredicate, predicateManager, node.cright(), schema);