From 7c555d5bc63ab27a1426b37dc01cd582e3592621 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Fri, 18 Mar 2016 15:28:38 -0700 Subject: [PATCH 1/3] Update README.md --- demo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/README.md b/demo/README.md index 10a8c2e6a..9f819e0b6 100644 --- a/demo/README.md +++ b/demo/README.md @@ -88,6 +88,7 @@ Please send pull requests if you find ones that are missing here. ## Tutorials - [XGBoost Official RMarkdown Tutorials](https://xgboost.readthedocs.org/en/latest/R-package/index.html#tutorials) +- [An Introduction to XGBoost R Package](http://dmlc.ml/rstats/2016/03/10/xgboost.html) by Tong He - [Open Source Tools & Data Science Competitions](http://www.slideshare.net/odsc/owen-zhangopen-sourcetoolsanddscompetitions1) by Owen Zhang - XGBoost parameter tuning tips * [Feature Importance Analysis with XGBoost in Tax audit](http://fr.slideshare.net/MichaelBENESTY/feature-importance-analysis-with-xgboost-in-tax-audit) * [Winning solution of Kaggle Higgs competition: what a single model can do](http://no2147483647.wordpress.com/2014/09/17/winning-solution-of-kaggle-higgs-competition-what-a-single-model-can-do/) @@ -102,7 +103,6 @@ Please send pull requests if you find ones that are missing here. - [Notes on eXtreme Gradient Boosting](http://startup.ml/blog/xgboost) by ARSHAK NAVRUZYAN ([iPython Notebook](https://github.com/startupml/koan/blob/master/eXtreme%20Gradient%20Boosting.ipynb)) - [Complete Guide to Parameter Tuning in XGBoost](http://www.analyticsvidhya.com/blog/2016/03/complete-guide-parameter-tuning-xgboost-with-codes-python/) by Aarshay Jain - ## Usecases If you have particular usecase of xgboost that you would like to highlight. Send a PR to add a one sentence description:) From 5efc1ee3a47062fd5f2924fa023b46094bb37049 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 22 Mar 2016 12:54:18 +0000 Subject: [PATCH 2/3] Fixed typos. --- R-package/demo/basic_walkthrough.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R-package/demo/basic_walkthrough.R b/R-package/demo/basic_walkthrough.R index 193618be3..ece168a04 100644 --- a/R-package/demo/basic_walkthrough.R +++ b/R-package/demo/basic_walkthrough.R @@ -64,8 +64,8 @@ raw = xgb.save.raw(bst) # load binary model to R bst3 <- xgb.load(raw) pred3 <- predict(bst3, test$data) -# pred2 should be identical to pred -print(paste("sum(abs(pred3-pred))=", sum(abs(pred2-pred)))) +# pred3 should be identical to pred +print(paste("sum(abs(pred3-pred))=", sum(abs(pred3-pred)))) #----------------Advanced features -------------- # to use advanced features, we need to put data in xgb.DMatrix From bbb9ce1641a92c13948754a7949751b05ebfa068 Mon Sep 17 00:00:00 2001 From: Julian Quick Date: Tue, 22 Mar 2016 14:13:29 -0600 Subject: [PATCH 3/3] Verbose message: which fields have impropper data types A more verbose error message letting the user know which fields have impropper data types --- python-package/xgboost/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index 971d0a95b..80d171326 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -144,7 +144,8 @@ def _maybe_pandas_data(data, feature_names, feature_types): data_dtypes = data.dtypes if not all(dtype.name in PANDAS_DTYPE_MAPPER for dtype in data_dtypes): - raise ValueError('DataFrame.dtypes for data must be int, float or bool') + bad_fields = [data.columns[i] for i, dtype in enumerate(data_dtypes) if dtype.name not in PANDAS_DTYPE_MAPPER ] + raise ValueError('DataFrame.dtypes for data must be int, float or bool.\nDid not expect the data types in fie lds '+', '.join(bad_fields)) if feature_names is None: feature_names = data.columns.format()