first version that reproduce binary classification demo

This commit is contained in:
tqchen
2014-08-16 15:44:35 -07:00
parent c4acb4fe01
commit 2c969ecf14
11 changed files with 286 additions and 20 deletions

View File

@@ -7,9 +7,9 @@
namespace xgboost {
namespace io {
DataMatrix* LoadDataMatrix(const char *fname) {
DataMatrix* LoadDataMatrix(const char *fname, bool silent, bool savebuffer) {
DMatrixSimple *dmat = new DMatrixSimple();
dmat->CacheLoad(fname);
dmat->CacheLoad(fname, silent, savebuffer);
return dmat;
}
} // namespace io

View File

@@ -17,9 +17,11 @@ typedef learner::DMatrix<FMatrixS> DataMatrix;
/*!
* \brief load DataMatrix from stream
* \param fname file name to be loaded
* \param silent whether print message during loading
* \param savebuffer whether temporal buffer the file if the file is in text format
* \return a loaded DMatrix
*/
DataMatrix* LoadDataMatrix(const char *fname);
DataMatrix* LoadDataMatrix(const char *fname, bool silent = false, bool savebuffer = true);
/*!
* \brief save DataMatrix into stream,
* note: the saved dmatrix format may not be in exactly same as input