From d93e8717c15bf690bb967079854c90c2bee1c015 Mon Sep 17 00:00:00 2001 From: tqchen Date: Mon, 24 Mar 2014 00:31:53 -0700 Subject: [PATCH 1/5] fix test to pred --- regression/xgboost_reg_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression/xgboost_reg_main.cpp b/regression/xgboost_reg_main.cpp index f8180ccc9..4e590b05d 100644 --- a/regression/xgboost_reg_main.cpp +++ b/regression/xgboost_reg_main.cpp @@ -111,7 +111,7 @@ namespace xgboost{ inline void InitData( void ){ if( name_fmap != "NULL" ) fmap.LoadText( name_fmap.c_str() ); if( task == "dump" ) return; - if( task == "test" || task == "dumppath" ){ + if( task == "pred" || task == "dumppath" ){ data.CacheLoad( test_path.c_str(), silent!=0, use_buffer!=0 ); }else{ // training From f7d9c774d751107b93884b19aae07d07a451624a Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Wed, 26 Mar 2014 07:21:15 +0800 Subject: [PATCH 2/5] Update README --- demo/binary_classification/README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demo/binary_classification/README b/demo/binary_classification/README index 64ef214df..86cd68992 100644 --- a/demo/binary_classification/README +++ b/demo/binary_classification/README @@ -9,3 +9,5 @@ Format of featmap.txt: q means continuous quantities, i means indicator features. Feature id must be from 0 to num_features, in sorted order. + +Detailed explaination: https://github.com/tqchen/xgboost/wiki/Binary-Classification From 159ed0f7e1f62d9ff11570c39bf8f0f73e635af0 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Wed, 26 Mar 2014 08:01:24 +0800 Subject: [PATCH 3/5] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b05655f52..11f887f52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ xgboost: eXtreme Gradient Boosting ======= -An efficient general purpose gradient boosting (tree) library. +A General purpose gradient boosting (tree) library. Creater: Tianqi Chen @@ -32,7 +32,8 @@ Planned components - matrix factorization - structured prediction -File extension convention: +File extension convention +======= (1) .h are interface, utils and data structures, with detailed comment; (2) .cpp are implementations that will be compiled, with less comment; (3) .hpp are implementations that will be included by .cpp, with less comment From 87fc848b121eba3d9590c6dec4ba451f42fad286 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Wed, 26 Mar 2014 08:01:47 +0800 Subject: [PATCH 4/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 11f887f52..b1dee9fdd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Planned components File extension convention ======= -(1) .h are interface, utils and data structures, with detailed comment; -(2) .cpp are implementations that will be compiled, with less comment; -(3) .hpp are implementations that will be included by .cpp, with less comment +* .h are interface, utils and data structures, with detailed comment; +* .cpp are implementations that will be compiled, with less comment; +* .hpp are implementations that will be included by .cpp, with less comment From c7869a78559eba5e27e66b5a419cd382ae5b54f2 Mon Sep 17 00:00:00 2001 From: tqchen Date: Tue, 25 Mar 2014 17:17:00 -0700 Subject: [PATCH 5/5] small fix --- demo/binary_classification/runexp.sh | 9 +++++---- regression/xgboost_reg_main.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/demo/binary_classification/runexp.sh b/demo/binary_classification/runexp.sh index bd4354104..68c3e6fb9 100755 --- a/demo/binary_classification/runexp.sh +++ b/demo/binary_classification/runexp.sh @@ -6,9 +6,10 @@ python mknfold.py agaricus.txt 1 # training and output the models ../../xgboost mushroom.conf # output prediction task=pred -../../xgboost mushroom.conf task=pred model_in=0003.model -# print the boosters of 00003.model in dump.raw.txt -../../xgboost mushroom.conf task=dump model_in=0003.model name_dump=dump.raw.txt +../../xgboost mushroom.conf task=pred model_in=0002.model +# print the boosters of 00002.model in dump.raw.txt +../../xgboost mushroom.conf task=dump model_in=0002.model name_dump=dump.raw.txt # use the feature map in printing for better visualization -../../xgboost mushroom.conf task=dump model_in=0003.model fmap=featmap.txt name_dump=dump.nice.txt +../../xgboost mushroom.conf task=dump model_in=0002.model fmap=featmap.txt name_dump=dump.nice.txt cat dump.nice.txt + diff --git a/regression/xgboost_reg_main.cpp b/regression/xgboost_reg_main.cpp index 4e590b05d..9d43c22fb 100644 --- a/regression/xgboost_reg_main.cpp +++ b/regression/xgboost_reg_main.cpp @@ -155,7 +155,7 @@ namespace xgboost{ // always save final round if( save_period == 0 || num_round % save_period != 0 ){ if( model_out == "NULL" ){ - this->SaveModel( num_round ); + this->SaveModel( num_round - 1 ); }else{ this->SaveModel( model_out.c_str() ); }