public void readReserved(int length) throws IOException { int[] buffer = new int[length]; boolean empty = true; for(int i = 0; i < length; i++){ int value = readInt(); buffer[i] = value; empty &= (value == 0); } if(!empty){ throw new IOException("Expected " + length + "-element array of zeroes, got " + Arrays.toString(buffer)); } }
public void readReserved(int length) throws IOException { int[] buffer = new int[length]; boolean empty = true; for(int i = 0; i < length; i++){ int value = readInt(); buffer[i] = value; empty &= (value == 0); } if(!empty){ throw new IOException("Expected " + length + "-element array of zeroes, got " + Arrays.toString(buffer)); } }
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(); } }
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(); } }
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); } }
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); } }
public void load(XGBoostDataInput input) throws IOException { this.loss_chg = input.readFloat(); this.sum_hess = input.readFloat(); this.base_weight = input.readFloat(); this.leaf_child_cnt = input.readInt(); } }
public void load(XGBoostDataInput input) throws IOException { this.loss_chg = input.readFloat(); this.sum_hess = input.readFloat(); this.base_weight = input.readFloat(); this.leaf_child_cnt = input.readInt(); } }