MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AddSplit

Method AddSplit

tensorflow/contrib/tensor_forest/kernels/v4/grow_stats.cc:42–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 num_outputs_(params.num_outputs()) {}
41
42void GrowStats::AddSplit(const decision_trees::BinaryNode& split,
43 const std::unique_ptr<TensorDataSet>& input_data,
44 const InputTarget* target, int example) {
45 // It's possible that the split collection calls AddSplit, but we actually
46 // have all the splits we need and are just waiting for them to be fully
47 // initialized.
48 if (splits_.size() < num_splits_to_consider_) {
49 splits_.push_back(split);
50 evaluators_.emplace_back(
51 CreateBinaryDecisionNodeEvaluator(split, LEFT_INDEX, RIGHT_INDEX));
52 AddSplitStats(target, example);
53 }
54
55 if (input_data != nullptr && target != nullptr &&
56 params_.initialize_average_splits()) {
57 AdditionalInitializationExample(input_data, target, example);
58 }
59}
60
61void GrowStats::RemoveSplit(int split_num) {
62 splits_.erase(splits_.begin() + split_num);

Callers 4

RunBatchFunction · 0.80
TESTFunction · 0.80

Calls 4

sizeMethod · 0.45
push_backMethod · 0.45
emplace_backMethod · 0.45

Tested by 2

RunBatchFunction · 0.64
TESTFunction · 0.64