From b2341eab0c0367eb4f20496e879a95ed4ab52f55 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Sun, 20 Feb 2022 00:55:48 +0800 Subject: [PATCH] [R] Fix broken links. (#7670) --- R-package/DESCRIPTION | 1 + R-package/R/xgb.create.features.R | 2 +- R-package/R/xgb.dump.R | 2 -- R-package/man/xgb.create.features.Rd | 2 +- R-package/man/xgb.dump.Rd | 2 -- R-package/man/xgb.load.Rd | 2 +- R-package/man/xgb.save.raw.Rd | 11 ++++++++++- R-package/vignettes/discoverYourData.Rmd | 2 +- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/R-package/DESCRIPTION b/R-package/DESCRIPTION index 3137e9341..01601403c 100644 --- a/R-package/DESCRIPTION +++ b/R-package/DESCRIPTION @@ -26,6 +26,7 @@ Authors@R: c( person("Min", "Lin", role = c("aut")), person("Yifeng", "Geng", role = c("aut")), person("Yutian", "Li", role = c("aut")), + person("Jiaming", "Yuan", role = c("aut")), person("XGBoost contributors", role = c("cph"), comment = "base XGBoost implementation") ) diff --git a/R-package/R/xgb.create.features.R b/R-package/R/xgb.create.features.R index 182cc9451..f00ac9314 100644 --- a/R-package/R/xgb.create.features.R +++ b/R-package/R/xgb.create.features.R @@ -18,7 +18,7 @@ #' #' International Workshop on Data Mining for Online Advertising (ADKDD) - August 24, 2014 #' -#' \url{https://research.fb.com/publications/practical-lessons-from-predicting-clicks-on-ads-at-facebook/}. +#' \url{https://research.facebook.com/publications/practical-lessons-from-predicting-clicks-on-ads-at-facebook/}. #' #' Extract explaining the method: #' diff --git a/R-package/R/xgb.dump.R b/R-package/R/xgb.dump.R index ba8496600..b5b8b7eb4 100644 --- a/R-package/R/xgb.dump.R +++ b/R-package/R/xgb.dump.R @@ -6,8 +6,6 @@ #' @param fname the name of the text file where to save the model text dump. #' If not provided or set to \code{NULL}, the model is returned as a \code{character} vector. #' @param fmap feature map file representing feature types. -#' Detailed description could be found at -#' \url{https://github.com/dmlc/xgboost/wiki/Binary-Classification#dump-model}. #' See demo/ for walkthrough example in R, and #' \url{https://github.com/dmlc/xgboost/blob/master/demo/data/featmap.txt} #' for example Format. diff --git a/R-package/man/xgb.create.features.Rd b/R-package/man/xgb.create.features.Rd index 1b03b8bb9..52ac052cb 100644 --- a/R-package/man/xgb.create.features.Rd +++ b/R-package/man/xgb.create.features.Rd @@ -29,7 +29,7 @@ Joaquin Quinonero Candela)} International Workshop on Data Mining for Online Advertising (ADKDD) - August 24, 2014 -\url{https://research.fb.com/publications/practical-lessons-from-predicting-clicks-on-ads-at-facebook/}. +\url{https://research.facebook.com/publications/practical-lessons-from-predicting-clicks-on-ads-at-facebook/}. Extract explaining the method: diff --git a/R-package/man/xgb.dump.Rd b/R-package/man/xgb.dump.Rd index f1eeff2fb..791e74d96 100644 --- a/R-package/man/xgb.dump.Rd +++ b/R-package/man/xgb.dump.Rd @@ -20,8 +20,6 @@ xgb.dump( If not provided or set to \code{NULL}, the model is returned as a \code{character} vector.} \item{fmap}{feature map file representing feature types. -Detailed description could be found at -\url{https://github.com/dmlc/xgboost/wiki/Binary-Classification#dump-model}. See demo/ for walkthrough example in R, and \url{https://github.com/dmlc/xgboost/blob/master/demo/data/featmap.txt} for example Format.} diff --git a/R-package/man/xgb.load.Rd b/R-package/man/xgb.load.Rd index 8c20d0e2a..f644bc408 100644 --- a/R-package/man/xgb.load.Rd +++ b/R-package/man/xgb.load.Rd @@ -16,7 +16,7 @@ An object of \code{xgb.Booster} class. Load xgboost model from the binary model file. } \details{ -The input file is expected to contain a model saved in an xgboost-internal binary format +The input file is expected to contain a model saved in an xgboost model format using either \code{\link{xgb.save}} or \code{\link{cb.save.model}} in R, or using some appropriate methods from other xgboost interfaces. E.g., a model trained in Python and saved from there in xgboost format, could be loaded from R. diff --git a/R-package/man/xgb.save.raw.Rd b/R-package/man/xgb.save.raw.Rd index 6f2faa0ef..ad188eb83 100644 --- a/R-package/man/xgb.save.raw.Rd +++ b/R-package/man/xgb.save.raw.Rd @@ -5,10 +5,19 @@ \title{Save xgboost model to R's raw vector, user can call xgb.load.raw to load the model back from raw vector} \usage{ -xgb.save.raw(model) +xgb.save.raw(model, raw_format = "deprecated") } \arguments{ \item{model}{the model object.} + +\item{raw_format}{The format for encoding the booster. Available options are +\itemize{ + \item \code{json}: Encode the booster into JSON text document. + \item \code{ubj}: Encode the booster into Universal Binary JSON. + \item \code{deprecated}: Encode the booster into old customized binary format. +} + +Right now the default is \code{deprecated} but will be changed to \code{ubj} in upcoming release.} } \description{ Save xgboost model from xgboost or xgb.train diff --git a/R-package/vignettes/discoverYourData.Rmd b/R-package/vignettes/discoverYourData.Rmd index 7587956da..6706be81a 100644 --- a/R-package/vignettes/discoverYourData.Rmd +++ b/R-package/vignettes/discoverYourData.Rmd @@ -138,7 +138,7 @@ levels(df[,Treatment]) Next step, we will transform the categorical data to dummy variables. Several encoding methods exist, e.g., [one-hot encoding](https://en.wikipedia.org/wiki/One-hot) is a common approach. -We will use the [dummy contrast coding](https://stats.idre.ucla.edu/r/library/r-library-contrast-coding-systems-for-categorical-variables/) which is popular because it produces "full rank" encoding (also see [this blog post by Max Kuhn](http://appliedpredictivemodeling.com/blog/2013/10/23/the-basics-of-encoding-categorical-data-for-predictive-models)). +We will use the [dummy contrast coding](https://stats.oarc.ucla.edu/r/library/r-library-contrast-coding-systems-for-categorical-variables/) which is popular because it produces "full rank" encoding (also see [this blog post by Max Kuhn](http://appliedpredictivemodeling.com/blog/2013/10/23/the-basics-of-encoding-categorical-data-for-predictive-models)). The purpose is to transform each value of each *categorical* feature into a *binary* feature `{0, 1}`.