MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / AddBias

Method AddBias

include/LightGBM/tree.h:161–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159 }
160
161 inline void AddBias(double val) {
162 #pragma omp parallel for schedule(static, 1024) if (num_leaves_ >= 2048)
163 for (int i = 0; i < num_leaves_; ++i) {
164 leaf_value_[i] = val + leaf_value_[i];
165 }
166 // force to 1.0
167 shrinkage_ = 1.0f;
168 }
169
170 inline void AsConstantTree(double val) {
171 num_leaves_ = 1;

Callers 3

TrainOneIterMethod · 0.45
TrainOneIter_oldMethod · 0.45
TrainOneIter_newMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected