[Mboost-commits] r806 - devel/Adaptive_Regularization_Boosting pkg/mboostPatch/R pkg/mboostPatch/inst pkg/mboostPatch/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Nov 10 18:57:39 CET 2014
Author: hofner
Date: 2014-11-10 18:57:39 +0100 (Mon, 10 Nov 2014)
New Revision: 806
Added:
devel/Adaptive_Regularization_Boosting/NEWS
Removed:
devel/Adaptive_Regularization_Boosting/NEWS
Modified:
pkg/mboostPatch/R/crossvalidation.R
pkg/mboostPatch/inst/NEWS.Rd
pkg/mboostPatch/man/cvrisk.Rd
Log:
- Cross-validation was potentially wrong for CoxPH() models.
Users can now choose if they want the naive cross-validation
or the improved version by Verweij and van Houwelingen (1993);
(spotted by Holger Reulen)
Deleted: devel/Adaptive_Regularization_Boosting/NEWS
===================================================================
--- devel/Adaptive_Regularization_Boosting/NEWS 2014-10-02 16:44:04 UTC (rev 805)
+++ devel/Adaptive_Regularization_Boosting/NEWS 2014-11-10 17:57:39 UTC (rev 806)
@@ -1 +0,0 @@
-link inst/CHANGES
\ No newline at end of file
Added: devel/Adaptive_Regularization_Boosting/NEWS
===================================================================
--- devel/Adaptive_Regularization_Boosting/NEWS (rev 0)
+++ devel/Adaptive_Regularization_Boosting/NEWS 2014-11-10 17:57:39 UTC (rev 806)
@@ -0,0 +1,543 @@
+ CHANGES in `mboost' VERSION 2.1-0 (2010-0x-xx)
+
+ o add Binomial(link = "probit") and general cdf's as link
+ functions (experimental)
+
+ o bolscw can be mixed with other base-learners (although
+ not yet exported and not via the formula interface)
+
+ o speed up glmboost() a little bit
+
+ o added base-learners for radial basis functions (brad())
+ and smooth monotonic (or convex/concave) functions (bmono())
+
+ o added base-learners for Markov random fields (bmrf())
+
+ o bols(x, intercept = FALSE) only reasonable if x is centered
+
+ o bbs(x, cyclic = TRUE) for cyclic covariates ensures that
+ predictions at the boundaries coincide and that the resulting
+ function estimate is smoothly joined
+
+ o added extract() methods for base-learners and fitted models
+
+ o added residuals() function to extract residuals from the
+ model
+
+ o added new families:
+ - AUC() for AUC loss function
+ - GammaReg() for gamma regression models
+
+ o changed behavior of cvrisk() if weights are used:
+ out-of-bag-risk now weighted according to "weights" as
+ specified in call to mboost
+
+ o improved predict.mboost(): added names where missing and the
+ offset as attribute where applicable.
+
+ o changed default in glmboost() to center = TRUE
+
+ o fixed bug in predict() with glmboost.matrix(..., center = TRUE)
+
+ o coef now also works with tree base-learners
+ (returns NULL in this case)
+
+ o changed coef.gamboost to coef.mboost
+
+ o changed default for degrees of freedom in bspatial()
+ to df = 6
+
+ o added checks in bbs (and brandom) to ensure that the specified
+ degrees of freedom are greater than the range of the (unpenalized)
+ null space
+
+ o various improvements in plot.mboost function
+
+ o added warning if df2lambda is likely to become numerically
+ instable (i.e. in the case of large entries in the design matrix)
+
+ CHANGES in `mboost' VERSION 2.0-9 (2010-11-19, r543)
+
+ o add gbm to Suggests
+
+
+ CHANGES in `mboost' VERSION 2.0-8 (2010-11-11, r542)
+
+ o make survival package happy again
+
+
+ CHANGES in `mboost' VERSION 2.0-7 (2010-09-28, r534)
+
+ o vignette "mboost" updated
+
+ o remove problem with R CMD check that occured on some 64bit systems
+
+
+ CHANGES in `mboost' VERSION 2.0-6 (2010-05-22, r510)
+
+ o no not use multicore functionality in R CMD check, really.
+
+
+ CHANGES in `mboost' VERSION 2.0-5 (2010-05-21, r507)
+
+ o no not use multicore functionality in R CMD check
+
+
+ CHANGES in `mboost' VERSION 2.0-4 (2010-04-15, r490)
+
+ o new vignette "mboost" describing 2.0-x series features
+
+ o fixed bug in bols(): contrast.arg was ignored if not a named list
+ (which is wasn't per default)
+
+ o added (missing) response functions to families Weibull(),
+ Loglog(), Lognormal() and NBinomial()
+
+ o fixed bug in family CoxPH which occured with NAs
+
+ o improvements and corrections in documentation
+
+
+ CHANGES in `mboost' VERSION 2.0-3 (2010-03-10, r456)
+
+ o glmboost(..., center = TRUE) now also centers columns of the
+ design matrix corresponding to contrasts of factors
+ when an intercept term is present leading to faster risk
+ minimization in these cases.
+
+ o coef.glmboost: New argument `off2int = TRUE' adds the
+ offset to the intercept. In addition, the intercept
+ term is now adjusted for centered covariates.
+
+ o check for infinite residuals in mboost_fit(). Especially
+ for family = Poisson(), something like boost_control(nu = 0.01)
+ fixes this problem.
+
+ o "by" (in bols() and bbs()) can now handle factors with more than
+ two levels
+
+ o improved plot.mboost() for varying coefficients
+
+ o minor improvements in documentation
+
+
+ CHANGES in `mboost' VERSION 2.0-2 (2010-03-04)
+
+ o fixed bug in helper function get_index, which caused (in some circumstances)
+ wrong handling of factors in gamboost() (spotted by
+ Juliane Schaefer <JSchaefer _at_ uhbs.ch>)
+
+ o reduce memory footprint in blackboost (requires party 0.9-9993)
+
+
+ CHANGES in `mboost' VERSION 2.0-1 (2010-03-01)
+
+ o fixed bug in coef( , aggregate = "cumsum"): fraction "nu" was missing
+
+
+ CHANGES in `mboost' VERSION 2.0-0 (2010-02-01)
+
+ o generic implementation of component-wise functional gradient
+ boosting in `mboost_fit', specialized code for linear,
+ additive and interaction models removed
+
+ o new families available for ordinal, expectile and censored regression
+
+ o computations potentially based on package Matrix
+ (reduces memory usage)
+
+ o various speed improvements
+
+ o added interface to extract selected base-learners (selected())
+
+ o added interface for parallel computations in cvrisk with
+ arbitrary packages (e.g. multicore, snow)
+
+ o added "which" argument in predict and coef functions and improved
+ usability of "which" in plot-function. Users can specify "which" as
+ numeric value or as a character string
+
+ o added function cv() to generate matrices for k-fold cross-validation,
+ subsampling and bootstrap
+
+ o new function stabsel() for stability selection with error control
+
+ o added function model.weights() to extract the weights
+
+ o added interface to expand model by increasing mstop in
+ model[mstop]
+
+ o alternative definition of degrees of freedom available
+
+ o Interface changes:
+
+ - class definition / Family() arguments changed
+ - changed behavior of subset method (model[mstop]). Object
+ is directly altered and not duplicated
+ - argument "center" in bols replaced with "intercept"
+ - argument "z" in base-learners replaced with "by"
+ - bns and bss deprecated;
+
+
+ CHANGES in `mboost' VERSION 1.1-4 (2009-11-18)
+
+ o fixed bug in prediction with varying coefficients for binary
+ effect modifiers
+
+ CHANGES in `mboost' VERSION 1.1-3 (2009-09-21)
+
+ o better x-axes in plot.cvrisk and possibility to change xlab
+
+ o parallel cvrisk on Unix systems only (`multicore' isn't safe on windows)
+
+ o included new penalty for ordinal predictors (in bols())
+
+ o corrected bug in bspatial (centering was not used for Xna)
+
+ o removed output of dfbase (which is seldom used) in gamboost
+
+ o changed manual for coef.gamboost
+
+ o make sure NAs are handled correctly when center = TRUE
+ in glmboost
+
+
+ CHANGES in `mboost' VERSION 1.1-2 (2009-07-21)
+
+ o better weights and boundary knots handling in bspatial
+
+ o cvrisk runs in parallel if package `multicore' is available
+
+ o errors removed and minor improvements in the manuals
+
+ o center = TRUE in glmboost did only apply to numeric (not integer)
+ predictors
+
+ o for safety reasons: na.action = na.omit again
+ (causes slight changes in wpbc3 example)
+
+
+ CHANGES in `mboost' VERSION 1.1-1 (2009-04-21)
+
+ o new quantile regression facilities.
+
+ o fix problem with bbs baselearner and cvrisk
+
+
+ CHANGES in `mboost' VERSION 1.1-0 (2009-03-27)
+
+ o bbs instead of bss is the default baselearner in gamboost
+
+ o make sure bbs with weights and expanded observations
+ returns numerically the very same results
+
+ o btree can now deal with multiple variables
+
+ o new gMDL criterion (contributed by Zhu Wang <zhu.wang at yale.edu>)
+
+ o make survival package happy again
+
+
+ CHANGES in `mboost' VERSION 1.0-6 (2009-01-09)
+
+ o bols allows to specify non-default contrasts.
+
+
+ CHANGES in `mboost' VERSION 1.0-5 (2008-12-02)
+
+ o remove experimental memory optimization steps
+
+
+ CHANGES in `mboost' VERSION 1.0-4 (2008-11-12)
+
+ o negative gradient of GaussClass() was wrong, spotted by
+ Kao Lin <linkao at picb.ac.cn>
+
+
+ CHANGES in `mboost' VERSION 1.0-3 (2008-11-07)
+
+ o Date was malformed in DESCRIPTION
+
+
+ CHANGES in `mboost' VERSION 1.0-2 (2008-11-05)
+
+ o improved memory footprint in gamboost() and cvrisk()
+
+ o option to suppress saving of ensembless added to
+ boost_control()
+
+ o bbs(), bns(), bspatial(): default number of knots changed to
+ a fixed value (= 20)
+
+ o changed default for grid (now uses all iterations) in
+ cvrisk() and changed plot.cvrisk()
+
+ o bols: works now for factors and can be set-up
+ to use Ridge-estimation. Intercept can be omitted
+ now (via center = TRUE).
+
+ o new btree() baselearner for gamboost() available
+
+ o fix inconsistencies in regression tests
+
+ o add coef.gamboost
+
+ o new generic `survFit'
+
+ o cosmetics for trace = TRUE
+
+
+ CHANGES in `mboost' VERSION 1.0-1 (2007-12-09)
+
+ o inst/mboost_Bioinf.R was missing from mboost 1.0-0
+
+
+ CHANGES in `mboost' VERSION 1.0-0 (2007-11-13)
+
+ o documentation updates
+
+
+ CHANGES in `mboost' VERSION 0.9-0 (internal)
+
+ o tests update and release the new version on CRAN
+
+ o predict(..., allIterations = TRUE) returns the matrix
+ of predictors for all boosting iterations
+
+
+ CHANGES in `mboost' VERSION 0.6-2 (internal)
+
+ o move `mboost' to R-forge
+
+ o improvements in `gamboost':
+ - P-splines as base learners available
+ - new formula interface for specifying the base learner
+ - new plot.gamboost
+
+ o add the number of selected variables as degrees of freedom
+ (as mentioned in the discussion of Hastie to Buehlmann & Hothorn)
+
+ o status information during fitting is now available via
+ boost_control(trace = TRUE) but is switched off by default
+
+ o acknowledge constributions by Thomas Kneib and Matthias Schmid
+ in DESCRIPTION
+
+
+ CHANGES in `mboost' VERSION 0.6-1 (internal)
+
+ o gamboost() now allows for user-specified base learners
+ via the formula interface
+
+ o gamboost.matrix(x = x, ...) requires colnames being set
+ for `x'
+
+ o na.action = na.omit fix for g{al}mboost()
+
+
+ CHANGES in `mboost' VERSION 0.5-8 (2007-05-31)
+
+ o gamboost(..., weights = w) was broken
+
+
+ CHANGES in `mboost' VERSION 0.5-7 (2007-05-30)
+
+ o extract response correctly in fitted.blackboost
+
+ o hatvalues (and thus AICs) for GLMs with centering of
+ covariates may have been wrong since version 0.5-0
+
+ o add paper examples to tests
+
+
+ CHANGES in `mboost' VERSION 0.5-6 (2007-05-07)
+
+ o fix Rd problems
+
+
+ CHANGES in `mboost' VERSION 0.5-5 (2007-04-25)
+
+ o `westbc' regenerated
+
+ o LazyLoad: yes (no SaveImage: yes)
+
+
+ CHANGES in `mboost' VERSION 0.5-4 (2007-04-18)
+
+ o plot() method for `glmboost' objects visualizing the
+ coefficient path (feature request by Axel Benner <benner at dkfz.de>).
+
+ o predict(newdata = <matrix>) was broken for gamboost(),
+ thanks to Max Kuhn <Max.Kuhn at pfizer.com> for spotting this.
+
+
+ CHANGES in `mboost' VERSION 0.5-3 (2007-03-23)
+
+ o predict() for gamboost(..., dfbase = 1) was not working correctly
+
+ o small performance and memory improvements for glmboost()
+
+
+ CHANGES in `mboost' VERSION 0.5-2 (2007-02-28)
+
+ o some performance improvements for `glmboost()'
+
+ o blackboost() is now generic with formula and x, y interface
+
+ o plot() method for cvrisk() and AIC() output now allows for ylim
+ specification without troubles
+
+
+ CHANGES in `mboost' VERSION 0.5-1 (2007-02-02)
+
+ o depends party 0.9-9
+
+
+ CHANGES in `mboost' VERSION 0.5-0 (2007-01-30)
+
+ o new `baselearner' argument to `gamboost' allowing to
+ specify difference component-wise base-learners to
+ be used. Currently implemented: "ssp" for smoothing splines
+ (default), "bsp" for B-splines and "ols" for linear models.
+ The latter two haven't been tested yet.
+
+ o The `dfbase' arguments now applies to each covariate and
+ no longer to each column of the design matrix.
+
+ o cvrisk() for blackboost() was broken, totally :-(
+
+ o centered covariates were returned by glmboost() and gamboost()
+
+ o Poisson() used an incorrect offset
+
+ o check for y being positive counts when family = "Poisson()"[B
+
+ o checks for Poisson() logLik() and AIC() methods
+
+ o fire a warning when all u > 0 or u < 0
+
+ o update vignette `mboost_illustrations'
+
+
+ CHANGES in `mboost' VERSION 0.4-17 (2007-01-15)
+
+ o fix problem with `dfbase' in `gamboost', spotted by
+ Karin Eckel <Karin.Eckel at imbe.imed.uni-erlangen.de>
+
+
+ CHANGES in `mboost' VERSION 0.4-16 (2007-01-12)
+
+ o work around stats4:::AIC
+
+
+ CHANGES in `mboost' VERSION 0.4-15 (2006-12-06)
+
+ o fix plot problems in plot.cvrisk
+
+ o allow for centering of the numerical covariates in glmboost and
+ gamboost
+
+
+ CHANGES in `mboost' VERSION 0.4-14 (2006-10-27)
+
+ o AIC(..., "classical") is now faster for non-gaussian families
+
+
+ CHANGES in `mboost' VERSION 0.4-13 (2006-10-04)
+
+ o predict(..., newdata) can take a matrix now
+
+
+ CHANGES in `mboost' VERSION 0.4-12 (2006-09-13)
+
+ o predict(<blackboost-object>, type = "response") did not return
+ factors when the response was actually a factor
+
+ o report offset in print methods
+
+ o add offset attribute to coef.glmboost
+
+
+ CHANGES in `mboost' VERSION 0.4-11 (2006-09-07)
+
+ o add `contrasts.arg' argument to `glmboost.formula'
+
+ o more meaningful default for `grid' in `cvrisk'
+
+ o R-2.4.0 fixes
+
+
+ CHANGES in `mboost' VERSION 0.4-10 (2006-08-30)
+
+ o add checks for CoxPH (against coefficients and logLik of coxph)
+
+ o add weights to CoxPH
+
+ o the ngradient function in Family objects needs to implement
+ arguments (y, f, w), not just (y, f)
+
+ o check for meaningful class of the response for some families
+
+
+ CHANGES in `mboost' VERSION 0.4-9 (2006-07-17)
+
+ o some small speed improvements in `gamboost'
+
+ o handle factors in `gamboost' properly (via a linear model)
+
+ o the dfbase argument can take a vector now (in `gamboost')
+
+ o update and improve entries in DESCRIPTION
+
+ o documentation updates
+
+
+ CHANGES in `mboost' VERSION 0.4-8 (2006-07-05)
+
+ o Huber() is `Huber Error', not `Huber Absolute Error'
+
+ o added `CoxPH' family object for fitting Cox models
+
+ o remove inst/LaTeX
+
+ o use NROW / NCOL more often (now that `y' may be a `Surv' object)
+
+ o implement `cvrisk', a general cross-validation function for the
+ empirical risk and a corresponding plot method
+
+ o unify risk computations in all three fitting functions
+
+ o unify names for `gb' objects
+
+ o allow for out-of-bag risk computations
+
+ o some cosmetics
+
+ o update keywords in Rd-files
+
+ o risk was always 0 in Huber()@risk when d was choosen adaptively
+
+ o pData(westbc)$nodal.y has levels `negative' and `positive'
+ (lymph node status)
+
+
+ CHANGES in `mboost' VERSION 0.4-7 (2006-06-19)
+
+ o add src/Makevars (required for Windows builds)
+
+ o make sure objects that are modified at C-level get _copied_ in
+ `blackboost'
+
+
+ CHANGES in `mboost' VERSION 0.4-6 (2006-06-14)
+
+ o some minor `codetools' fixes: removed unused variables
+ and an out-dated function
+
+ o add `codetools' checks to regression tests
+
+ o fix xlab in plot.gbAIC
+
+______________________________________________________________________________
+
+ `mboost' version 0.4-5 published on CRAN 2006-06-13
Modified: pkg/mboostPatch/R/crossvalidation.R
===================================================================
--- pkg/mboostPatch/R/crossvalidation.R 2014-10-02 16:44:04 UTC (rev 805)
+++ pkg/mboostPatch/R/crossvalidation.R 2014-11-10 17:57:39 UTC (rev 806)
@@ -7,8 +7,10 @@
cvrisk <- function(object, ...)
UseMethod("cvrisk")
-cvrisk.mboost <- function (object, folds = cv(model.weights(object)), grid = 1:mstop(object),
- papply = mclapply, fun = NULL, ...){
+cvrisk.mboost <- function (object, folds = cv(model.weights(object)),
+ grid = 1:mstop(object), papply = mclapply,
+ fun = NULL, corrected = TRUE, ...) {
+
weights <- model.weights(object)
if (any(weights == 0))
warning("zero weights")
@@ -24,21 +26,48 @@
fam_name <- object$family at name
call <- deparse(object$call)
if (is.null(fun)) {
- dummyfct <- function(weights, oobweights) {
- mod <- fitfct(weights = weights, oobweights = oobweights)
- mod[max(grid)]
- mod$risk()[grid]
+ if (fam_name != "Cox Partial Likelihood" || !corrected) {
+ dummyfct <- function(weights, oobweights) {
+ mod <- fitfct(weights = weights, oobweights = oobweights)
+ mod[max(grid)]
+ mod$risk()[grid]
+ }
+ } else {
+ ## If family = CoxPH(), cross-validation needs to be computed as in
+ ## Verweij, van Houwelingen (1993), Cross-validation in survival
+ ## analysis, Statistics in Medicine, 12:2305-2314.
+ plloss <- environment(object$family at risk)[["plloss"]]
+
+ if (is.null(fun)) {
+ dummyfct <- function(weights, oobweights) {
+ ## <FIXME> Should the risk be computed on the inbag
+ ## (currently done) or on the oobag observations?
+ mod <- fitfct(weights = weights, oobweights = oobweights,
+ risk = "inbag")
+ mod[max(grid)]
+
+ pr <- predict(mod, aggregate = "cumsum")
+ ## <FIXME> are the weights w really equal to 1? Shouldn't it
+ ## be equal to the original fitting weights? Is this
+ ## computed on ALL observations (currently done) or only on
+ ## the OOBAG observations?
+ lplk <- apply(pr[, grid], 2, function(f)
+ sum(plloss(y = object$response, f = f, w = 1)))
+ ## return negative "cvl"
+ - mod$risk()[grid] - lplk
+ }
+ }
}
- }
- else {
+ } else { ## !is.null(fun)
dummyfct <- function(weights, oobweights) {
mod <- fitfct(weights = weights, oobweights = oobweights)
mod[max(grid)]
- ### make sure dispatch works correctly
+ ## make sure dispatch works correctly
class(mod) <- class(object)
fun(mod)
}
}
+
## use case weights as out-of-bag weights (but set inbag to 0)
OOBweights <- matrix(rep(weights, ncol(folds)), ncol = ncol(folds))
OOBweights[folds > 0] <- 0
Modified: pkg/mboostPatch/inst/NEWS.Rd
===================================================================
--- pkg/mboostPatch/inst/NEWS.Rd 2014-10-02 16:44:04 UTC (rev 805)
+++ pkg/mboostPatch/inst/NEWS.Rd 2014-11-10 17:57:39 UTC (rev 806)
@@ -4,12 +4,16 @@
\section{Changes in mboost version 2.4-1 (2014-xx-yy)}{
\subsection{Miscellaneous}{
\itemize{
- \item
+ \item
}
}
\subsection{Bug-fixes}{
\itemize{
- \item
+ \item Cross-validation was potentially wrong for \code{CoxPH()}
+ models. Users can now choose if they want the naive
+ cross-validation or the improved version by Verweij and van
+ Houwelingen (1993); (spotted by Holger Reulen <hreulen _ at _
+ uni-goettingen.de>)
}
}
}
Modified: pkg/mboostPatch/man/cvrisk.Rd
===================================================================
--- pkg/mboostPatch/man/cvrisk.Rd 2014-10-02 16:44:04 UTC (rev 805)
+++ pkg/mboostPatch/man/cvrisk.Rd 2014-11-10 17:57:39 UTC (rev 806)
@@ -10,7 +10,7 @@
\method{cvrisk}{mboost}(object, folds = cv(model.weights(object)),
grid = 1:mstop(object),
papply = mclapply,
- fun = NULL, ...)
+ fun = NULL, corrected = TRUE, ...)
cv(weights, type = c("bootstrap", "kfold", "subsampling"),
B = ifelse(type == "kfold", 10, 25), prob = 0.5, strata = NULL)
}
@@ -32,6 +32,10 @@
\item{fun}{ if \code{fun} is NULL, the out-of-sample risk is returned. \code{fun},
as a function of \code{object}, may extract any other characteristic
of the cross-validated models. These are returned as is.}
+ \item{corrected}{ if \code{TRUE}, the corrected cross-validation
+ scheme of Verweij and van Houwelingen (1993) is used in case of Cox
+ models. Otherwise, the naive standard cross-validation scheme is
+ used.}
\item{weights}{ a numeric vector of weights for the model to be cross-validated.}
\item{type}{ character argument for specifying the cross-validation
method. Currently (stratified) bootstrap, k-fold cross-validation
@@ -85,6 +89,10 @@
component-wise gradient boosting. \emph{Methods of Information in
Medicine}, \bold{51}, 178--186. \cr
DOI: \url{http://dx.doi.org/10.3414/ME11-02-0030}
+
+ Verweij and van Houwelingen (1993). Cross-validation in survival
+ analysis. \emph{Statistics in Medicine}, \bold{12}:2305--2314.
+
}
\seealso{\code{\link{AIC.mboost}} for
\code{AIC} based selection of the stopping iteration. Use \code{mstop}
More information about the Mboost-commits
mailing list