NEWS
irboost 0.2
- minor update vignette/irbst_code.Rmd
- update the reference with published paper: Unified robust boosting
- Compatibility updates for newer xgboost (tested with xgboost 3.2.0.1) to
preserve behavior observed with older xgboost (e.g., 1.7.10.1).
- Fix multi-class softmax objective (objective="multi:softprob") for newer
xgboost where the returned soft-probability vector ordering differs from
older versions:
- add internal helper .reshape_softprob() to detect the correct ordering
(by observation vs by class) using the row-sum-to-1 property.
- update irboost() and irb.train() loss calculations to use the reshaped
probability matrix so robust weights are computed consistently.
- update predict.irboost_model() to return multi:softprob predictions in
the historical "by observation" order so existing user code that does
matrix(pred, ncol=num_class, byrow=TRUE) remains valid.
- avoid reliance on non-exported xgboost helper APIs (e.g.,
xgboost::xgb.parameters) so R CMD check does not warn about missing or
unexported objects; multi:softprob output is detected by length and
normalized accordingly.
- store training params in returned irboost_model objects (new element
'params') for reliable downstream behavior (e.g., predict).
- Ensure single-threaded behavior by default for CRAN checks and for
reproducibility:
- if params$nthread is not supplied, set params$nthread <- 1 in
irboost(), irb.train(), and irb.train_aft().
- update Rd examples to use nthread=1 and set common thread environment
variables (OMP_NUM_THREADS, OPENBLAS_NUM_THREADS, MKL_NUM_THREADS, etc.)
to avoid "CPU time > elapsed time" check NOTES on multi-core machines.
- pass nthread explicitly to xgboost::xgb.DMatrix() inside irboost()
to prevent multi-threaded DMatrix construction from inflating CPU time.
- add OMP_THREAD_LIMIT=1 in Rd examples to further constrain OpenMP runtimes.
- Fix and reformat irb.train_aft() examples (params assignment and line wraps)
to satisfy Rd line width checks and keep examples reproducible.
- Vignette maintenance (vignettes/irbst_code.Rmd):
- switch to a static HTML vignette (static_irbst.html + .asis) to support
xgboost outputs that are HTML widgets (e.g., xgb.plot.tree()).
- replace deprecated xgboost::xgboost(..., params=...) usage with
xgboost::xgb.DMatrix + xgboost::xgb.train().
- make cross-validation output robust when best_iteration is NULL
(fallback to which.min on evaluation_log).
- remove network dependency by using MASS::Boston instead of downloading
the housing dataset at build time.
- minor reproducibility/timing cleanups (explicit tree_method="exact",
seeds, and misclassification rate reporting).
- Update maintainer email address in DESCRIPTION and documentation.
irboost 0.1
- this is previously called package ccboost. The name change better helps to understand better the algorithm
- modify executing check_s following the update of mpath package on function R/check_s
- vignettes/irbst.Rnw was substantially modified
- how to update Rd? The devtools::document() function updates the NAMESPACE file, and devtools::install() reinstalls the package with the updated documentation.
library(roxygen2)
roxygen2::roxygenize()
devtools::document()
- how to build package?
R CMD build --compact-vignettes="both" irboost
- convert irbst.Rnw to irbst_knitr.Rmd
https://ulriklyngs.com/post/2021/12/02/how-to-adapt-any-latex-template-for-use-with-r-markdown-in-four-steps/
1. Obtain irbst_jds.tex using
R CMD Sweave irbst.Rnw
cp irbst.tex irbst_jds.tex
change $ to $$
sed -i 's/\$/\$\$/g' irbst_jds.tex
add $body$ in irbst_jds.tex to integrate code in irbst_knitr.Rmd
2. In irbst_knitr.Rmd with the following lines
title: "Unified robust boosting"
output:
bookdown::pdf_document2:
template: irbst_jds.tex
- convert irbst.Rnw to irbst.Rmd
1. convert Sweave format irbst.Rnw to knitr using ...
library(knitr)
Sweave2knitr('irbst.Rnw') # you will get irbst-knitr.Rnw by default
2. convert irbst-knitr.Rnw to irbst.Rmd using R function Rnw2Rmd from package mdsr
- change $ to $$ in a text file
sed -i 's/\$/\$\$/g' your_file.txt
- some parameters in R/irboost.R are now moved to a new argument params, a list of parameters. The argument params in irboost is passed to argument params in xgboost::xgboost
- move the code part of irbst_knitr.Rmd to irbst_code.Rmd
- remove irbst.Rnw, irbst_jds.tex, irbst_knitr.Rmd and associated latex format files