public void load(XGBoostDataInput input) throws IOException { this.num_roots = input.readInt(); this.num_nodes = input.readInt(); this.num_deleted = input.readInt(); this.max_depth = input.readInt(); this.num_feature = input.readInt(); this.size_leaf_vector = input.readInt(); input.readReserved(31); this.nodes = new ArrayList<>(); for(int i = 0; i < this.num_nodes; i++){ Node node = new Node(); node.load(input); this.nodes.add(node); } this.stats = new ArrayList<>(); for(int i = 0; i < this.num_nodes; i++){ NodeStat stat = new NodeStat(); stat.load(input); this.stats.add(stat); } }
if(!node.is_leaf()){ int splitIndex = node.split_index(); Number splitValue = Float.intBitsToFloat(node.split_cond()); rightPredicate = predicateManager.createSimplePredicate(continuousFeature, SimplePredicate.Operator.GREATER_OR_EQUAL, value); defaultLeft = node.default_left(); org.dmg.pmml.tree.Node leftChild = encodeNode(leftPredicate, predicateManager, node.cleft(), schema); org.dmg.pmml.tree.Node rightChild = encodeNode(rightPredicate, predicateManager, node.cright(), schema); float value = node.leaf_value();
if(!node.is_leaf()){ int splitIndex = node.split_index(); Number splitValue = Float.intBitsToFloat(node.split_cond()); rightPredicate = predicateManager.createSimplePredicate(continuousFeature, SimplePredicate.Operator.GREATER_OR_EQUAL, value); defaultLeft = node.default_left(); org.dmg.pmml.tree.Node leftChild = encodeNode(leftPredicate, predicateManager, node.cleft(), schema); org.dmg.pmml.tree.Node rightChild = encodeNode(rightPredicate, predicateManager, node.cright(), schema); float value = node.leaf_value();
public void load(XGBoostDataInput input) throws IOException { this.num_roots = input.readInt(); this.num_nodes = input.readInt(); this.num_deleted = input.readInt(); this.max_depth = input.readInt(); this.num_feature = input.readInt(); this.size_leaf_vector = input.readInt(); input.readReserved(31); this.nodes = new ArrayList<>(); for(int i = 0; i < this.num_nodes; i++){ Node node = new Node(); node.load(input); this.nodes.add(node); } this.stats = new ArrayList<>(); for(int i = 0; i < this.num_nodes; i++){ NodeStat stat = new NodeStat(); stat.load(input); this.stats.add(stat); } }