rank pass toy
This commit is contained in:
@@ -11,20 +11,11 @@
|
||||
#include "../base/xgboost_boost_task.h"
|
||||
#include "xgboost_rank.h"
|
||||
#include "../regression/xgboost_reg.h"
|
||||
|
||||
#include "../regression/xgboost_reg_main.cpp"
|
||||
#include "../base/xgboost_data_instance.h"
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
xgboost::random::Seed(0);
|
||||
xgboost::base::BoostTask tsk;
|
||||
xgboost::utils::ConfigIterator itr(argv[1]);
|
||||
/* int learner_index = 0;
|
||||
while (itr.Next()){
|
||||
if (!strcmp(itr.name(), "learning_task")){
|
||||
learner_index = atoi(itr.val());
|
||||
}
|
||||
}*/
|
||||
xgboost::rank::RankBoostLearner* rank_learner = new xgboost::rank::RankBoostLearner;
|
||||
xgboost::base::BoostLearner *parent = static_cast<xgboost::base::BoostLearner*>(rank_learner);
|
||||
tsk.SetLearner(parent);
|
||||
return tsk.Run(argc, argv);
|
||||
xgboost::random::Seed(0);
|
||||
xgboost::base::BoostTask rank_tsk;
|
||||
rank_tsk.SetLearner(new xgboost::rank::RankBoostLearner);
|
||||
return rank_tsk.Run(argc, argv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user