add rank
This commit is contained in:
parent
a383f11759
commit
bb93c0aaac
@ -81,6 +81,7 @@ namespace xgboost{
|
|||||||
rec.clear();
|
rec.clear();
|
||||||
for(unsigned j = gptr[k]; j < gptr[k+1]; ++j ){
|
for(unsigned j = gptr[k]; j < gptr[k+1]; ++j ){
|
||||||
rec.push_back( std::make_pair(info.labels[j], j) );
|
rec.push_back( std::make_pair(info.labels[j], j) );
|
||||||
|
grad[j] = hess[j] = 0.0f;
|
||||||
}
|
}
|
||||||
std::sort( rec.begin(), rec.end(), CmpFirst );
|
std::sort( rec.begin(), rec.end(), CmpFirst );
|
||||||
// enumerate buckets with same label, for each item in the list, grab another sample randomly
|
// enumerate buckets with same label, for each item in the list, grab another sample randomly
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user