add pairwise rank first version

This commit is contained in:
tqchen
2014-04-29 21:12:30 -07:00
parent 924e164c14
commit 77e3051b1d
5 changed files with 117 additions and 8 deletions

View File

@@ -177,9 +177,9 @@ namespace xgboost{
* root_index.size() can be 0 which indicates that no pre-partition involved
*/
inline void DoBoost(std::vector<float> &grad,
std::vector<float> &hess,
const booster::FMatrixS &feats,
const std::vector<unsigned> &root_index) {
std::vector<float> &hess,
const booster::FMatrixS &feats,
const std::vector<unsigned> &root_index) {
booster::IBooster *bst = this->GetUpdateBooster();
bst->DoBoost(grad, hess, feats, root_index);
}
@@ -213,6 +213,10 @@ namespace xgboost{
}
return psum;
}
/*! \return number of boosters so far */
inline int NumBoosters(void) const{
return mparam.num_boosters;
}
public:
//--------trial code for interactive update an existing booster------
//-------- usually not needed, ignore this region ---------