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

Method PushData

include/LightGBM/feature_group.h:131–139  ·  view source on GitHub ↗

! * \brief Push one record, will auto convert to bin and push to bin data * \param tid Thread id * \param idx Index of record * \param value feature value of record */

Source from the content-addressed store, hash-verified

129 * \param value feature value of record
130 */
131 inline void PushData(int tid, int sub_feature_idx, data_size_t line_idx, double value) {
132 uint32_t bin = bin_mappers_[sub_feature_idx]->ValueToBin(value);
133 if (bin == bin_mappers_[sub_feature_idx]->GetDefaultBin()) { return; }
134 bin += bin_offsets_[sub_feature_idx];
135 if (bin_mappers_[sub_feature_idx]->GetDefaultBin() == 0) {
136 bin -= 1;
137 }
138 bin_data_->Push(tid, line_idx, bin);
139 }
140
141 inline void CopySubset(const FeatureGroup* full_feature, const data_size_t* used_indices, data_size_t num_used_indices) {
142 bin_data_->CopySubset(full_feature->bin_data_.get(), used_indices, num_used_indices);

Callers 4

PushOneRowMethod · 0.45
PushOneDataMethod · 0.45

Calls 3

ValueToBinMethod · 0.45
GetDefaultBinMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected