From bf2426f3cdd8ec13f88345f2cd010285db89d3a7 Mon Sep 17 00:00:00 2001 From: tqchen Date: Fri, 12 Sep 2014 17:31:06 -0700 Subject: [PATCH] some changes --- src/io/page_fmatrix-inl.hpp | 12 +++++++++++- src/learner/learner-inl.hpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/io/page_fmatrix-inl.hpp b/src/io/page_fmatrix-inl.hpp index 3b53c2484..af8be333f 100644 --- a/src/io/page_fmatrix-inl.hpp +++ b/src/io/page_fmatrix-inl.hpp @@ -249,9 +249,15 @@ class FMatrixPage : public IFMatrix { } virtual void InitColAccess(float pkeep = 1.0f) { if (this->HaveColAccess()) return; + utils::Printf("start to initialize page col access\n"); + if (this->LoadColData()) { + utils::Printf("loading previously saved col data\n"); + return; + } this->InitColData(pkeep, fname_cbuffer_.c_str(), - 64 << 20, 5); + 1 << 30, 5); utils::Check(this->LoadColData(), "fail to read in column data"); + utils::Printf("finish initialize page col access\n"); } /*! * \brief get the row iterator associated with FMatrix @@ -331,6 +337,10 @@ class FMatrixPage : public IFMatrix { ColBatch::Entry((bst_uint)(batch.base_rowid+i), inst[j].fvalue)); } + if (ktop % 100000 == 0) { + utils::Printf("\r \r"); + utils::Printf("InitCol: %lu rows ", static_cast(ktop)); + } } } } diff --git a/src/learner/learner-inl.hpp b/src/learner/learner-inl.hpp index 6257658c1..e13234989 100644 --- a/src/learner/learner-inl.hpp +++ b/src/learner/learner-inl.hpp @@ -162,7 +162,7 @@ class BoostLearner { * if not intialize it * \param p_train pointer to the matrix used by training */ - inline void CheckInit(DMatrix *p_train) { + inline void CheckInit(DMatrix *p_train) { p_train->fmat()->InitColAccess(prob_buffer_row); } /*!