зеркало из https://github.com/microsoft/LightGBM.git
change the type in set_query_at
This commit is contained in:
Родитель
fdf1f3260a
Коммит
665c9dbace
|
@ -128,7 +128,7 @@ public:
|
|||
* \param idx Index of this record
|
||||
* \param value Query Id value of this record
|
||||
*/
|
||||
inline void SetQueryAt(data_size_t idx, float value)
|
||||
inline void SetQueryAt(data_size_t idx, data_size_t value)
|
||||
{
|
||||
queries_[idx] = static_cast<data_size_t>(value);
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ void Dataset::ExtractFeaturesFromMemory() {
|
|||
if (inner_data.first == weight_idx_) {
|
||||
metadata_.SetWeightAt(i, static_cast<float>(inner_data.second));
|
||||
} else if (inner_data.first == group_idx_) {
|
||||
metadata_.SetQueryAt(i, static_cast<float>(inner_data.second));
|
||||
metadata_.SetQueryAt(i, static_cast<data_size_t>(inner_data.second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ void Dataset::ExtractFeaturesFromMemory() {
|
|||
if (inner_data.first == weight_idx_) {
|
||||
metadata_.SetWeightAt(i, static_cast<float>(inner_data.second));
|
||||
} else if (inner_data.first == group_idx_) {
|
||||
metadata_.SetQueryAt(i, static_cast<float>(inner_data.second));
|
||||
metadata_.SetQueryAt(i, static_cast<data_size_t>(inner_data.second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ void Dataset::ExtractFeaturesFromFile() {
|
|||
if (inner_data.first == weight_idx_) {
|
||||
metadata_.SetWeightAt(start_idx + i, static_cast<float>(inner_data.second));
|
||||
} else if (inner_data.first == group_idx_) {
|
||||
metadata_.SetQueryAt(start_idx + i, static_cast<float>(inner_data.second));
|
||||
metadata_.SetQueryAt(start_idx + i, static_cast<data_size_t>(inner_data.second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче