From 5e839f6fe7a8bbe0c43730135bab521f839b1355 Mon Sep 17 00:00:00 2001 From: hetong Date: Sat, 30 Aug 2014 10:55:13 -0700 Subject: [PATCH] change location and template of vignette --- R-package/{inst/doc => vignettes}/xgboost.Rnw | 75 ++++++++++++------- R-package/vignettes/xgboost.bib | 20 +++++ 2 files changed, 66 insertions(+), 29 deletions(-) rename R-package/{inst/doc => vignettes}/xgboost.Rnw (81%) create mode 100644 R-package/vignettes/xgboost.bib diff --git a/R-package/inst/doc/xgboost.Rnw b/R-package/vignettes/xgboost.Rnw similarity index 81% rename from R-package/inst/doc/xgboost.Rnw rename to R-package/vignettes/xgboost.Rnw index fde6181e6..be2cfea22 100644 --- a/R-package/inst/doc/xgboost.Rnw +++ b/R-package/vignettes/xgboost.Rnw @@ -1,31 +1,59 @@ \documentclass{article} - -\usepackage{natbib} -\usepackage{graphics} -\usepackage{amsmath} +\RequirePackage{url} \usepackage{hyperref} -\usepackage{indentfirst} -\usepackage[utf8]{inputenc} +\RequirePackage{amsmath} +\RequirePackage{natbib} +\RequirePackage[a4paper,lmargin={1.25in},rmargin={1.25in},tmargin={1in},bmargin={1in}]{geometry} -% \VignetteIndexEntry{xgboost} +\makeatletter +% \VignetteIndexEntry{xgboost: eXtreme Gradient Boosting} +%\VignetteKeywords{xgboost, gbm, gradient boosting machines} +%\VignettePackage{xgboost} +% \VignetteEngine{knitr::knitr} +\makeatother \begin{document} +%\SweaveOpts{concordance=TRUE} -<>= -options(keep.source = TRUE, width = 60) -foo <- packageDescription("xgboost") +<>= +if (require('knitr')) opts_chunk$set(fig.width = 5, fig.height = 5, fig.align = 'center', tidy = FALSE, warning = FALSE, cache = TRUE) @ -\title{xgboost Package Example (Version \Sexpr{foo$Version})} -\author{Tong He} -\maketitle +% +<>= +xgboost.version = '0.3-0' +@ +% + + \begin{center} + \vspace*{6\baselineskip} + \rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} + \rule{\textwidth}{0.4pt}\\[2\baselineskip] + {\LARGE \textbf{xgboost: eXtreme Gradient Boosting}}\\[1.2\baselineskip] + \rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} + \rule{\textwidth}{1.6pt}\\[2\baselineskip] + {\Large Tianqi Chen, Tong He}\\[\baselineskip] + {\large Package Version: \Sexpr{xgboost.version}}\\[\baselineskip] + {\large \today}\par + \vfill + \begin{figure}[h] + \centering + \includegraphics[width=0.4\textwidth]{fig/sfu-logo.pdf} + \end{figure} + \end{center} + +\thispagestyle{empty} + +\clearpage + +\setcounter{page}{1} \section{Introduction} This is an introductory document of using the \verb@xgboost@ package in R. \verb@xgboost@ is short for eXtreme Gradient Boosting package. It is an efficient - and scalable implementation of gradient boosting framework by \cite{gbm}. + and scalable implementation of gradient boosting framework by \citep{friedman2001greedy}. The package includes efficient linear model solver and tree learning algorithm. It supports various objective functions, including regression, classification and ranking. The package is made to be extendible, so that user are also allowed @@ -49,6 +77,7 @@ to define there own objectives easily. It has several features: datasets.} \end{enumerate} + \section{Example with iris} In this section, we will illustrate some common usage of \verb@xgboost@. @@ -183,20 +212,8 @@ single model. This results stands in the \href{http://www.kaggle.com/c/higgs-boson/leaderboard}{top 30\%} of the competition. - -\begin{thebibliography}{} - -\bibitem[Friedman et al.(2001)Friedman, Jerome H.]{gbm} -Friedman, Jerome H. (2001). -\newblock Greedy function approximation: a gradient boosting machine. -\newblock In \emph{ Annals of Statistics} (2001): 1189-1232. - -\bibitem[Friedman(2000)]{logitboost} -Friedman, Jerome, Trevor Hastie, and Robert Tibshirani. (2000). -\newblock Additive logistic regression: a statistical view of boosting (with discussion and a rejoinder by the authors). -\newblock \emph{The annals of statistics} 28.2 (2000):337-407. - -\end{thebibliography} - +\bibliographystyle{jss} +\nocite{*} % list uncited references +\bibliography{xgboost} \end{document} diff --git a/R-package/vignettes/xgboost.bib b/R-package/vignettes/xgboost.bib new file mode 100644 index 000000000..f69866f04 --- /dev/null +++ b/R-package/vignettes/xgboost.bib @@ -0,0 +1,20 @@ +@article{friedman2001greedy, + title={Greedy function approximation: a gradient boosting machine}, + author={Friedman, Jerome H}, + journal={Annals of Statistics}, + pages={1189--1232}, + year={2001}, + publisher={JSTOR} +} + +@article{friedman2000additive, + title={Additive logistic regression: a statistical view of boosting (with discussion and a rejoinder by the authors)}, + author={Friedman, Jerome and Hastie, Trevor and Tibshirani, Robert and others}, + journal={The annals of statistics}, + volume={28}, + number={2}, + pages={337--407}, + year={2000}, + publisher={Institute of Mathematical Statistics} +} +