seems ok, need review destructors

This commit is contained in:
tqchen@graphlab.com 2014-08-27 19:12:13 -07:00
parent f175e1cfb4
commit 8aeb038ddd
2 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ SLIB = wrapper/libxgboostwrapper.so
#RLIB = wrapper/libxgboostR.so
.PHONY: clean all R python
all: $(BIN) $(OBJ)
all: $(BIN) $(OBJ) $(SLIB)
#python: wrapper/libxgboostwrapper.so
#xgboost: src/xgboost_main.cpp src/io/io.cpp src/data.h src/tree/*.h src/tree/*.hpp src/gbm/*.h src/gbm/*.hpp src/utils/*.h src/learner/*.h src/learner/*.hpp

View File

@ -16,7 +16,7 @@ using namespace xgboost::io;
namespace xgboost {
namespace wrapper {
// booster wrapper class
class Booster: public learner::BoostLearner<FMatrixS> {
class Booster: public learner::BoostLearner {
public:
explicit Booster(const std::vector<DataMatrix*>& mats) {
this->silent = 1;
@ -37,7 +37,7 @@ class Booster: public learner::BoostLearner<FMatrixS> {
for (bst_omp_uint j = 0; j < ndata; ++j) {
gpair_[j] = bst_gpair(grad[j], hess[j]);
}
gbm_->DoBoost(train.fmat, train.info.info, &gpair_);
gbm_->DoBoost(train.fmat(), train.info.info, &gpair_);
}
inline void CheckInitModel(void) {
if (!init_model) {
@ -45,7 +45,7 @@ class Booster: public learner::BoostLearner<FMatrixS> {
}
}
inline void LoadModel(const char *fname) {
learner::BoostLearner<FMatrixS>::LoadModel(fname);
learner::BoostLearner::LoadModel(fname);
this->init_model = true;
}
inline const char** GetModelDump(const utils::FeatMap& fmap, bool with_stats, bst_ulong *len) {
@ -135,7 +135,7 @@ extern "C"{
ret.info.info.num_row = len;
ret.info.info.num_col = src.info.num_col();
utils::IIterator<RowBatch> *iter = src.fmat.RowIterator();
utils::IIterator<RowBatch> *iter = src.fmat()->RowIterator();
iter->BeforeFirst();
utils::Assert(iter->Next(), "slice");
const RowBatch &batch = iter->Value();