update tree maker to make it more robust
This commit is contained in:
parent
3de07b0abe
commit
1d8c2391e8
@ -3,3 +3,4 @@ python wrapper for xgboost using ctypes
|
|||||||
see example for usage
|
see example for usage
|
||||||
|
|
||||||
to make the python module, type make in the root directory of project
|
to make the python module, type make in the root directory of project
|
||||||
|
|
||||||
|
|||||||
@ -271,7 +271,8 @@ class ColMaker: public IUpdater<FMatrix> {
|
|||||||
}
|
}
|
||||||
// start enumeration
|
// start enumeration
|
||||||
const unsigned nsize = static_cast<unsigned>(feat_set.size());
|
const unsigned nsize = static_cast<unsigned>(feat_set.size());
|
||||||
#pragma omp parallel for schedule(dynamic, 1)
|
const int batch_size = std::max(static_cast<int>(nsize / this->nthread / 32), 1);
|
||||||
|
#pragma omp parallel for schedule(dynamic, batch_size)
|
||||||
for (unsigned i = 0; i < nsize; ++i) {
|
for (unsigned i = 0; i < nsize; ++i) {
|
||||||
const unsigned fid = feat_set[i];
|
const unsigned fid = feat_set[i];
|
||||||
const int tid = omp_get_thread_num();
|
const int tid = omp_get_thread_num();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user