[Mboost-commits] r769 - / pkg/mboostDevel pkg/mboostDevel/R pkg/mboostDevel/inst pkg/mboostDevel/man pkg/mboostDevel/tests pkg/mboostDevel/tests/Examples pkg/mboostDevel/vignettes pkg/mboostPatch
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 23 15:59:45 CEST 2014
Author: hofner
Date: 2014-06-23 15:59:44 +0200 (Mon, 23 Jun 2014)
New Revision: 769
Added:
pkg/mboostDevel/.RbuildignoreCRAN
pkg/mboostDevel/tests/regtest-inference.Rout.save
Removed:
pkg/mboostPatch/data/
Modified:
pkg/mboostDevel/DESCRIPTION
pkg/mboostDevel/R/AAA.R
pkg/mboostDevel/R/crossvalidation.R
pkg/mboostDevel/R/mboost.R
pkg/mboostDevel/R/methods.R
pkg/mboostDevel/inst/CHANGES
pkg/mboostDevel/man/Family.Rd
pkg/mboostDevel/man/baselearners.Rd
pkg/mboostDevel/man/cvrisk.Rd
pkg/mboostDevel/man/gamboost.Rd
pkg/mboostDevel/man/glmboost.Rd
pkg/mboostDevel/man/mboost.Rd
pkg/mboostDevel/man/mboost_package.Rd
pkg/mboostDevel/man/methods.Rd
pkg/mboostDevel/man/stabsel.Rd
pkg/mboostDevel/tests/Examples/mboostDevel-Ex.Rout.save
pkg/mboostDevel/tests/birds_Biometrics.Rout.save
pkg/mboostDevel/tests/bugfixes.R
pkg/mboostDevel/tests/bugfixes.Rout.save
pkg/mboostDevel/tests/regtest-baselearner.Rout.save
pkg/mboostDevel/tests/regtest-blackboost.Rout.save
pkg/mboostDevel/tests/regtest-family.Rout.save
pkg/mboostDevel/tests/regtest-gamboost.Rout.save
pkg/mboostDevel/tests/regtest-glmboost.Rout.save
pkg/mboostDevel/tests/regtest-hatmatrix.Rout.save
pkg/mboostDevel/tests/regtest-inference.R
pkg/mboostDevel/vignettes/SurvivalEnsembles.Rout.save
pkg/mboostDevel/vignettes/mboost.Rout.save
pkg/mboostDevel/vignettes/mboost_illustrations.Rout.save
pkg/mboostDevel/vignettes/mboost_tutorial.Rnw
pkg/mboostDevel/vignettes/mboost_tutorial.Rout.save
svn_release.txt
Log:
mboost 2.3-0: prepare release candidate
- updated references
- changed \dontrun to \donttest
- fixed a problem in mboost_fit (when names of base-learners were missing)
- updated NEWS, NAMESPACE etc.
- removed data from mboostPatch
Added: pkg/mboostDevel/.RbuildignoreCRAN
===================================================================
--- pkg/mboostDevel/.RbuildignoreCRAN (rev 0)
+++ pkg/mboostDevel/.RbuildignoreCRAN 2014-06-23 13:59:44 UTC (rev 769)
@@ -0,0 +1,5 @@
+demo
+to_do_list.txt
+test
+^\..*
+vignettes/.*\.Rout\.save$
\ No newline at end of file
Modified: pkg/mboostDevel/DESCRIPTION
===================================================================
--- pkg/mboostDevel/DESCRIPTION 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/DESCRIPTION 2014-06-23 13:59:44 UTC (rev 769)
@@ -1,7 +1,7 @@
Package: mboostDevel
Title: Model-Based Boosting
Version: 2.3-0
-Date: 2013-XX-XX
+Date: 2014-06-23
Authors at R: c(person("Torsten", "Hothorn", role = c("aut", "cre"),
email = "Torsten.Hothorn at R-project.org"),
person("Peter", "Buehlmann", role = "aut"),
Modified: pkg/mboostDevel/R/AAA.R
===================================================================
--- pkg/mboostDevel/R/AAA.R 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/R/AAA.R 2014-06-23 13:59:44 UTC (rev 769)
@@ -31,11 +31,7 @@
packageStartupMessage("This is mboostDevel ", vers, ". ", "See ",
sQuote("package?mboostDevel"), " and the NEWS file\n",
"for a complete list of changes.\n",
- "Note: The default for the computation",
- " of the degrees of freedom has changed.\n",
- " For details see section ",
- sQuote("Global Options"), " of ",
- sQuote("?bols"), ".", appendLF = TRUE)
+ appendLF = TRUE)
return(TRUE)
}
Modified: pkg/mboostDevel/R/crossvalidation.R
===================================================================
--- pkg/mboostDevel/R/crossvalidation.R 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/R/crossvalidation.R 2014-06-23 13:59:44 UTC (rev 769)
@@ -39,6 +39,7 @@
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
oobrisk <- papply(1:ncol(folds),
Modified: pkg/mboostDevel/R/mboost.R
===================================================================
--- pkg/mboostDevel/R/mboost.R 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/R/mboost.R 2014-06-23 13:59:44 UTC (rev 769)
@@ -43,7 +43,7 @@
### <FIXME> is this correct with zero weights??? </FIXME>
weights <- rescale_weights(weights)
if (is.null(oobweights))
- oobweights <- as.numeric(weights == 0)
+ oobweights <- as.numeric(weights == 0)
if (control$risk == "oobag") {
triskfct <- function(y, f) riskfct(y, f, oobweights)
} else {
@@ -108,7 +108,11 @@
}
}
+ ## if names are missing try to get these from the calls
+ if (is.null(bnames) && !cwlin)
+ names(blg) <- names(bl) <- bnames <- sapply(blg, function(x) x$get_call())
+
### set up a function for boosting
boost <- function(niter) {
for (m in (mstop + 1):(mstop + niter)) {
Modified: pkg/mboostDevel/R/methods.R
===================================================================
--- pkg/mboostDevel/R/methods.R 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/R/methods.R 2014-06-23 13:59:44 UTC (rev 769)
@@ -99,6 +99,12 @@
df = c("trace", "actset"), ..., k = 2) {
df <- match.arg(df)
+ if (df == "actset" && !inherits(object, "glmboost")) {
+ df <- "trace"
+ warning("df = ", dQuote("actset"), " can only be used with ",
+ sQuote("glmboost"), " models. df = ", dQuote("trace"),
+ " is used instead.")
+ }
if (df == "trace") {
hatval <- hatvalues(object)
RET <- AICboost(object, method = method,
Modified: pkg/mboostDevel/inst/CHANGES
===================================================================
--- pkg/mboostDevel/inst/CHANGES 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/inst/CHANGES 2014-06-23 13:59:44 UTC (rev 769)
@@ -1,19 +1,59 @@
- CHANGES in `mboost' VERSION 2.3-0 (2013-XX-XX)
+ CHANGES in `mboost' VERSION 2.3-0 (2014-06-23)
- o stabsel was recoded and now uses different terminology and a better
- tested code base
+ o stabsel was recoded and now uses different terminology, much more options
+ and a better tested code base
o new replacement function mstop<- as an alternative to <mboost>[i]
(suggested by Achim Zeileis).
- o bbs allows monotone T-splines
+ o bmono:
+ - new and faster algorithm to compute monotonic P-splines (type = "quad.prog")
+ - new constraints added for positive and negative spline estimates
- o new argument deriv to bbs for computing derivatives of B-splines
+ o bbs:
+ - allows monotone T-splines (experimental)
+ - new argument deriv to bbs for computing derivatives of B-splines
- o new constraints added for positive and negative spline estimates
+ o bmrf can now also handle neighborhood matrizes as an argument to bnd
+ o added new families Hurdle and Multinomial
+ o boost_control: added new argument stopintern for internal stopping
+ (based on oobag data) during fitting
+
+ o Misc:
+ - added new argmument which to variable.names()
+ - added new method risk to extract risks
+ - brandom now checks that a factor is given
+ - speed improvements when updating a model via mod[mstop]
+ - changed \dontrun to \donttest
+ - updated references
+
+ o Bugfixes:
+ - fixed a problem with extract() of single base-learners
+ - fixed bug in AIC.mboost: df = "actset" can only be used with
+ glmboost models
+ - fixed package startup messages
+ - fixed a problem in mboost_fit (when names of base-learners were missing)
+
+
+ CHANGES in `mboost' VERSION 2.2-3 (2013-09-09, r733)
+
+ o fixed bugs in survival families:
+ - offset in all survival families was based on max(survtime) instead
+ of max(log(survtime));
+ - offset in CoxPH can't be computed from Cox Partial LH as constants
+ are canceled out; Use fixed offset instead;
+
+ o speed up checking of manual by changing some computations (e.g. reduce
+ mstop) or exclude code from checking via \dontrun{}
+
+ o removed dependency on ipred (replaced with TH.data)
+
+ o small improvements in manual
+
+
CHANGES in `mboost' VERSION 2.2-2 (2013-02-08, r703)
o bbs(..., center = "spectralDecomp") computes the spectral decomposition
Modified: pkg/mboostDevel/man/Family.Rd
===================================================================
--- pkg/mboostDevel/man/Family.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/Family.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -253,11 +253,11 @@
\emph{Statistics and Computing}, \bold{20}, 139-150.
Benjamin Hofner, Andreas Mayr, Nikolay Robinzonov and Matthias Schmid
- (2012). Model-based Boosting in R: A Hands-on Tutorial Using the R
- Package mboost. \emph{Computational Statistics}.\cr
+ (2014). Model-based Boosting in R: A Hands-on Tutorial Using the R
+ Package mboost. \emph{Computational Statistics}, \bold{29}, 3--35.\cr
\url{http://dx.doi.org/10.1007/s00180-012-0382-5}
- Available as vignette via: vignette(package = "mboostDevel", "mboost_tutorial")
+ Available as vignette via: \code{vignette(package = "mboostDevel", "mboost_tutorial")}
Brent A. Johnson and Qi Long (2011) Survival ensembles by the sum of pairwise
differences with application to lung cancer microarray studies.
@@ -288,7 +288,7 @@
family = Multinomial())
head(round(predict(mlm, type = "response"), 2))
- \dontrun{
+ \donttest{
### compare results with nnet::multinom
mlmn <- multinom(Species ~ Sepal.Length, data = iris)
max(abs(fitted(mlm[1000], type = "response") -
Modified: pkg/mboostDevel/man/baselearners.Rd
===================================================================
--- pkg/mboostDevel/man/baselearners.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/baselearners.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -173,12 +173,13 @@
conjunction with \code{boundary.constraints = TRUE}.}
\item{type}{
determines how the constrained least squares problem should be
- solved. If \code{type = "iterative"}, the iterative procedure
- described in Hofner et al. (2011b) is used. If \code{type =
- "quad.prog"}, a numeric quadratic programming method (Goldfarb and
- Idnani, 1982, 1983) is used (see \code{\link{solve.QP}} in package
- \pkg{quadprog}). The quadratic programming approach is usually much
- faster than the iterative approach.
+ solved. If \code{type = "quad.prog"}, a numeric quadratic
+ programming method (Goldfarb and Idnani, 1982, 1983) is used
+ (see \code{\link{solve.QP}} in package \pkg{quadprog}). If
+ \code{type = "iterative"}, the iterative procedure described in
+ Hofner et al. (2011b) is used. The quadratic programming approach is
+ usually much faster than the iterative approach. For details see
+ Hofner et al. (2014).
}
\item{lambda2}{ penalty parameter for the (monotonicity) constraint. }
\item{niter}{ maximum number of iterations used to compute constraint
@@ -383,8 +384,10 @@
with an additional asymmetric penalty enforcing monotonicity or
convexity/concavity (see and Eilers, 2005). For more details in the
boosting context and monotonic effects of ordinal factors see Hofner,
- Mueller and Hothorn (2011b). Alternative monotonicity constraints
- are implemented via T-splines in \code{bbs()} (Beliakov, 2000).
+ Mueller and Hothorn (2011b). The quadratic-programming based algorithm
+ is described in Hofner et al. (2014). Alternative monotonicity
+ constraints are implemented via T-splines in \code{bbs()} (Beliakov,
+ 2000).
Two or more linear base-learners can be joined using \code{\%+\%}. A
tensor product of two or more linear base-learners is returned by
@@ -484,6 +487,10 @@
Monotonicity-Constrained Species Distribution Models,
\emph{Ecology}, \bold{92}, 1895--1901.
+ Benjamin Hofner, Thomas Kneib, and Torsten Hothorn (2014),
+ A Unified Framework of Constrained Regression,
+ \emph{Technical Report}, \url{http://arxiv.org/abs/1403.7118}.
+
Thomas Kneib, Torsten Hothorn and Gerhard Tutz (2009), Variable
selection and model choice in geoadditive regression models,
\emph{Biometrics}, \bold{65}(2), 626--634.
@@ -517,15 +524,14 @@
### set up base-learners
spline1 <- bbs(x1, knots = 20, df = 4)
- attributes(spline1)
-
+ extract(spline1, "design")[1:10, 1:10]
+ extract(spline1, "penalty")
knots.x2 <- quantile(x2, c(0.25, 0.5, 0.75))
spline2 <- bbs(x2, knots = knots.x2, df = 5)
- attributes(spline2)
+ ols3 <- bols(x3)
+ extract(ols3)
+ ols4 <- bols(x4)
- attributes(ols3 <- bols(x3))
- attributes(ols4 <- bols(x4))
-
### compute base-models
drop(ols3$dpp(weights)$fit(y)$model) ## same as:
coef(lm(y ~ x3, weights = weights))
@@ -550,9 +556,10 @@
model <- gamboost(y ~ bols(x1, x2, intercept = FALSE) +
bols(x1, intercept = FALSE) +
bols(x2, intercept = FALSE),
- control = boost_control(mstop = 400))
+ control = boost_control(mstop = 50))
coef(model, which = 1) # one base-learner for x1 and x2
coef(model, which = 2:3) # two separate base-learners for x1 and x2
+ # zero because they were (not yet) selected.
### example for bspatial
x1 <- runif(250,-pi,pi)
@@ -561,21 +568,56 @@
y <- sin(x1) * sin(x2) + rnorm(250, sd = 0.4)
spline3 <- bspatial(x1, x2, knots = 12)
- attributes(spline3)
+ Xmat <- extract(spline3, "design")
+ ## 12 inner knots + 4 boundary knots = 16 knots per direction
+ ## THUS: 16 * 16 = 256 columns
+ dim(Xmat)
+ extract(spline3, "penalty")[1:10, 1:10]
## specify number of knots separately
- form2 <- y ~ bspatial(x1, x2, knots = list(x1 = 12, x2 = 12))
+ form1 <- y ~ bspatial(x1, x2, knots = list(x1 = 12, x2 = 14))
## decompose spatial effect into parametric part and
## deviation with one df
form2 <- y ~ bols(x1) + bols(x2) + bols(x1, by = x2, intercept = FALSE) +
bspatial(x1, x2, knots = 12, center = TRUE, df = 1)
+\donttest{ mod1 <- gamboost(form1)
+ plot(mod1)
+ mod2 <- gamboost(form2)
+ x11()
+ ## automated plot function:
+ plot(mod2)
+ ## plot sum of linear and smooth effects:
+ library(lattice)
+ df <- expand.grid(x1 = unique(x1), x2 = unique(x2))
+ df$pred <- predict(mod2, newdata = df)
+ levelplot(pred ~ x1 * x2, data = df)
+}
+
+ ## specify radial basis function base-learner for spatial effect
+ ## and use data-adaptive effective range (theta = NULL, see 'args')
+ form3 <- y ~ brad(x1, x2)
+ ## Now use different settings, e.g. 50 knots and theta fixed to 0.4
+ ## (not really a good setting)
+ form4 <- y ~ brad(x1, x2, knots = 50, args = list(theta = 0.4))
+
+\donttest{ mod3 <- gamboost(form3)
+plot(mod3)
+dim(extract(mod3, what = "design", which = "brad")[[1]])
+knots <- attr(extract(mod3, what = "design", which = "brad")[[1]], "knots")
+
+mod4 <- gamboost(form4)
+dim(extract(mod4, what = "design", which = "brad")[[1]])
+plot(mod4)
+}
+
### random intercept
id <- factor(rep(1:10, each = 5))
raneff <- brandom(id)
- attributes(raneff)
+ extract(raneff, "design")
+ extract(raneff, "penalty")
## random intercept with non-observed category
set.seed(1907)
@@ -592,7 +634,8 @@
### random slope
z <- runif(50)
raneff <- brandom(id, by = z)
- attributes(raneff)
+ extract(raneff, "design")
+ extract(raneff, "penalty")
### specify simple interaction model (with main effect)
n <- 210
@@ -607,14 +650,14 @@
plot(y ~ x, col = z)
## specify main effect and interaction
mod_glm <- gamboost(y ~ bols(x) + bols(x, by = z),
- control = boost_control(mstop = 1000))
+ control = boost_control(mstop = 100))
nd <- data.frame(x, z)
nd <- nd[order(x),]
nd$pred_glm <- predict(mod_glm, newdata = nd)
for (i in seq(along = levels(z)))
with(nd[nd$z == i,], lines(x, pred_glm, col = z))
- mod_gam <- gamboost(y ~ bbs(x) + bbs(x, by = z),
- control = boost_control(mstop = 1000))
+ mod_gam <- gamboost(y ~ bbs(x) + bbs(x, by = z, df = 8),
+ control = boost_control(mstop = 100))
nd$pred_gam <- predict(mod_gam, newdata = nd)
for (i in seq(along = levels(z)))
with(nd[nd$z == i,], lines(x, pred_gam, col = z, lty = "dashed"))
@@ -629,27 +672,28 @@
mod <- gamboost(y ~ bols(int, intercept = FALSE) +
bols(x, intercept = FALSE),
data = tmpdata,
- control = boost_control(mstop = 2500))
+ control = boost_control(mstop = 1000))
cf <- unlist(coef(mod))
+ ## add offset
cf[1] <- cf[1] + mod$offset
- cf
- coef(lm(y ~ x, data = tmpdata))
+ signif(cf, 3)
+ signif(coef(lm(y ~ x, data = tmpdata)), 3)
- ### quicker and better with (mean-) centering
+ ### much quicker and better with (mean-) centering
tmpdata$x_center <- tmpdata$x - mean(tmpdata$x)
mod_center <- gamboost(y ~ bols(int, intercept = FALSE) +
bols(x_center, intercept = FALSE),
data = tmpdata,
- control = boost_control(mstop = 500))
+ control = boost_control(mstop = 100))
cf_center <- unlist(coef(mod_center, which=1:2))
## due to the shift in x direction we need to subtract
## beta_1 * mean(x) to get the correct intercept
cf_center[1] <- cf_center[1] + mod_center$offset -
cf_center[2] * mean(tmpdata$x)
- cf_center
- coef(lm(y ~ x, data = tmpdata))
+ signif(cf_center, 3)
+ signif(coef(lm(y ~ x, data = tmpdata)), 3)
- ### large data set with ties
+\donttest{ ### large data set with ties
nunique <- 100
xindex <- sample(1:nunique, 1000000, replace = TRUE)
x <- runif(nunique)
@@ -675,6 +719,7 @@
all.equal(c1, c2)
all.equal(c1, c3)
+}
### cyclic P-splines
set.seed(781)
@@ -742,7 +787,7 @@
volf <- matrix(fitted(mod), nrow = nrow(volcano))
image(volf, main = "fitted")
- ## the old-fashioned way, a waste of space and time
+\donttest{ ## the old-fashioned way, a waste of space and time
x <- expand.grid(x1, x2)
modx <- mboost(vol ~ bbs(Var2, df = 3, knots = 10)\%X\%
bbs(Var1, df = 3, knots = 10), data = x,
@@ -750,8 +795,8 @@
modx[250]
max(abs(fitted(mod) - fitted(modx)))
+}
-
### setting contrasts via contrasts.arg
x <- as.factor(sample(1:4, 100, replace = TRUE))
Modified: pkg/mboostDevel/man/cvrisk.Rd
===================================================================
--- pkg/mboostDevel/man/cvrisk.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/cvrisk.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -83,7 +83,8 @@
Andreas Mayr, Benjamin Hofner, and Matthias Schmid (2012). The
importance of knowing when to stop - a sequential stopping rule for
component-wise gradient boosting. \emph{Methods of Information in
- Medicine}, DOI: \url{http://dx.doi.org/10.3414/ME11-02-0030}
+ Medicine}, \bold{51}, 178--186. \cr
+ DOI: \url{http://dx.doi.org/10.3414/ME11-02-0030}
}
\seealso{\code{\link{AIC.mboost}} for
\code{AIC} based selection of the stopping iteration. Use \code{mstop}
Modified: pkg/mboostDevel/man/gamboost.Rd
===================================================================
--- pkg/mboostDevel/man/gamboost.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/gamboost.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -74,11 +74,11 @@
\emph{Journal of Machine Learning Research}, \bold{11}, 2109 -- 2113.
Benjamin Hofner, Andreas Mayr, Nikolay Robinzonov and Matthias Schmid
- (2012). Model-based Boosting in R: A Hands-on Tutorial Using the R
- Package mboost. \emph{Computational Statistics}.\cr
+ (2014). Model-based Boosting in R: A Hands-on Tutorial Using the R
+ Package mboost. \emph{Computational Statistics}, \bold{29}, 3--35.\cr
\url{http://dx.doi.org/10.1007/s00180-012-0382-5}
- Available as vignette via: vignette(package = "mboostDevel", "mboost_tutorial")
+ Available as vignette via: \code{vignette(package = "mboostDevel", "mboost_tutorial")}
}
\seealso{\code{\link{mboost}} for the generic boosting function and
\code{\link{glmboost}} for boosted linear models and
Modified: pkg/mboostDevel/man/glmboost.Rd
===================================================================
--- pkg/mboostDevel/man/glmboost.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/glmboost.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -78,11 +78,11 @@
Machine Learning Research}, \bold{11}, 2109--2113.
Benjamin Hofner, Andreas Mayr, Nikolay Robinzonov and Matthias Schmid
- (2012). Model-based Boosting in R: A Hands-on Tutorial Using the R
- Package mboost. \emph{Computational Statistics}.\cr
+ (2014). Model-based Boosting in R: A Hands-on Tutorial Using the R
+ Package mboost. \emph{Computational Statistics}, \bold{29}, 3--35.\cr
\url{http://dx.doi.org/10.1007/s00180-012-0382-5}
- Available as vignette via: vignette(package = "mboostDevel", "mboost_tutorial")
+ Available as vignette via: \code{vignette(package = "mboostDevel", "mboost_tutorial")}
}
\seealso{\code{\link{mboost}} for the generic boosting function and
\code{\link{gamboost}} for boosted additive models and
Modified: pkg/mboostDevel/man/mboost.Rd
===================================================================
--- pkg/mboostDevel/man/mboost.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/mboost.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -36,8 +36,10 @@
\item{family}{a \code{\link{Family}} object.}
\item{control}{ a list of parameters controlling the algorithm. For
more details see \code{\link{boost_control}}. }
- \item{oobweights}{ an additional vector of out-of-bag weights (used internally
- by \code{cvrisk}).}
+ \item{oobweights}{ an additional vector of out-of-bag weights, which is
+ used for the out-of-bag risk (i.e., if \code{boost_control(risk =
+ "oobag")}). This argument is also used internally by
+ \code{cvrisk}. }
\item{\dots}{ additional arguments passed to \code{\link{mboost_fit}},
including \code{weights}, \code{offset}, \code{family} and
\code{control}. }
@@ -105,11 +107,11 @@
\emph{The Annals of Statistics}, \bold{29}, 1189--1232.
Benjamin Hofner, Andreas Mayr, Nikolay Robinzonov and Matthias Schmid
- (2012). Model-based Boosting in R: A Hands-on Tutorial Using the R
- Package mboost. \emph{Computational Statistics}.\cr
+ (2014). Model-based Boosting in R: A Hands-on Tutorial Using the R
+ Package mboost. \emph{Computational Statistics}, \bold{29}, 3--35.\cr
\url{http://dx.doi.org/10.1007/s00180-012-0382-5}
- Available as vignette via: vignette(package = "mboostDevel", "mboost_tutorial")
+ Available as vignette via: \code{vignette(package = "mboostDevel", "mboost_tutorial")}
}
\seealso{\code{\link{glmboost}} for boosted linear models and
Modified: pkg/mboostDevel/man/mboost_package.Rd
===================================================================
--- pkg/mboostDevel/man/mboost_package.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/mboost_package.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -7,7 +7,7 @@
\description{
Functional gradient descent algorithm
(boosting) for optimizing general risk functions utilizing
- component-wise (penalised) least squares estimates or regression
+ component-wise (penalized) least squares estimates or regression
trees as base-learners for fitting generalized linear, additive
and interaction models to potentially high-dimensional data.
}
@@ -16,13 +16,13 @@
Package: \tab mboostDevel\cr
Type: \tab Package\cr
Version: \tab 2.3-0\cr
-Date: \tab 2013-XX-XX\cr
+Date: \tab 2014-06-23\cr
License: \tab GPL-2\cr
LazyLoad: \tab yes\cr
LazyData: \tab yes\cr
}
- This package is intended for modern regression modelling and stands
+ This package is intended for modern regression modeling and stands
in-between classical generalized linear and additive models, as for example
implemented by \code{\link{lm}}, \code{\link{glm}}, or \code{\link[mgcv]{gam}},
and machine-learning approaches for complex interactions models,
@@ -46,15 +46,41 @@
determine an appropriate model complexity. This task is the responsibility
of the data analyst.
- Hofner et al. (2012) present a comprehensive hands-on tutorial for using the
- package \code{mbost}.
+ Hofner et al. (2014) present a comprehensive hands-on tutorial for using the
+ package \code{mboost}, which is also available as
+ \code{vignette(package = "mboostDevel", "mboost_tutorial")}.
Ben Taieba and Hyndman (2013) used this package for fitting their model in the
Kaggle Global Energy Forecasting Competition 2012. The corresponding research
- paper is a good starting point when you plan to analyse your data using
+ paper is a good starting point when you plan to analyze your data using
\code{mboost}.
}
+
+\section{NEWS in 2.3-series}{
+
+ The stability selection procedure has been completely rewritten and
+ improved. The code base is now extensively tested. New options allow
+ for a less conservative error control.
+
+ Constrained effects can now be fitted using quadratic programming
+ methods using the option \code{type = "quad.prog"} (default) for
+ highly improved speed. Additionally, new constraints have been added.
+
+ Other important changes include:
+ \itemize{
+ \item A new replacement function \code{mstop(mod) <- i} as an alternative to
+ \code{mod[i]} was added (as suggested by Achim Zeileis).
+
+ \item We added new families \code{Hurdle} and \code{Multinomial}.
+
+ \item We added a new argument \code{stopintern} for internal stopping
+ (based on out-of-bag data) during fitting to \code{boost_control}.
+ }
+
+ For more changes see NEWS file.
+}
+
\section{NEWS in 2.2-series}{
Starting from version 2.2, the default for the degrees of freedom has
changed. Now the degrees of freedom are (per default) defined as
@@ -67,7 +93,7 @@
\code{options(mboost_dftraceS = TRUE)} (see also B. Hofner et al.,
2011 and \code{\link{bols}}).
- Other important changes inlclude:
+ Other important changes include:
\itemize{
\item We switched from packages \code{multicore} and \code{snow} to
\code{parallel}
@@ -75,7 +101,7 @@
\item We changed the behavior of \code{bols(x, intercept = FALSE)}
when \code{x} is a factor: now the intercept is simply dropped from
the design matrix and the coding can be specified as usually for
- factors. Addtionally, a new contrast is introduced:
+ factors. Additionally, a new contrast is introduced:
\code{"contr.dummy"} (see \code{\link{bols}} for details).
\item We changed the computation of B-spline basis at the
@@ -139,7 +165,7 @@
Boosting algorithms: regularization, prediction and model fitting.
\emph{Statistical Science}, \bold{22}(4), 477--505.
- Torsten Hothorn, Peter Buehlmann, Thomas Kneib, Mattthias Schmid and
+ Torsten Hothorn, Peter Buehlmann, Thomas Kneib, Matthias Schmid and
Benjamin Hofner (2010), Model-based Boosting 2.0. \emph{Journal of
Machine Learning Research}, \bold{11}, 2109--2113.
@@ -148,15 +174,16 @@
\emph{Journal of Computational and Graphical Statistics}, \bold{20}, 956--971.
Benjamin Hofner, Andreas Mayr, Nikolay Robinzonov and Matthias Schmid
- (2012). Model-based Boosting in R: A Hands-on Tutorial Using the R
- Package mboost. \emph{Computational Statistics}.\cr
+ (2014). Model-based Boosting in R: A Hands-on Tutorial Using the R
+ Package mboost. \emph{Computational Statistics}, \bold{29}, 3--35.\cr
\url{http://dx.doi.org/10.1007/s00180-012-0382-5}
- Available as vignette via: vignette(package = "mboostDevel", "mboost_tutorial")
+ Available as vignette via: \code{vignette(package = "mboostDevel",
+ "mboost_tutorial")}
- Souhaib Ben Taieba and Rob J. Hyndman (2013),
+ Souhaib Ben Taieba and Rob J. Hyndman (2014),
A gradient boosting approach to the Kaggle load forecasting competition.
- \emph{International Journal of Forecasting},
+ \emph{International Journal of Forecasting}, \bold{30}, 382--394.\cr
\url{http://dx.doi.org/10.1016/j.ijforecast.2013.07.005}
}
Modified: pkg/mboostDevel/man/methods.Rd
===================================================================
--- pkg/mboostDevel/man/methods.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/methods.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -335,7 +335,8 @@
Andreas Mayr, Benjamin Hofner, and Matthias Schmid (2012). The
importance of knowing when to stop - a sequential stopping rule for
component-wise gradient boosting. \emph{Methods of Information in
- Medicine}, DOI: \url{http://dx.doi.org/10.3414/ME11-02-0030}
+ Medicine}, \bold{51}, 178--186. \cr
+ DOI: \url{http://dx.doi.org/10.3414/ME11-02-0030}
}
\seealso{ \code{\link{gamboost}}, \code{\link{glmboost}} and
Modified: pkg/mboostDevel/man/stabsel.Rd
===================================================================
--- pkg/mboostDevel/man/stabsel.Rd 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/man/stabsel.Rd 2014-06-23 13:59:44 UTC (rev 769)
@@ -126,11 +126,11 @@
N. Meinshausen and P. Buehlmann (2010), Stability selection.
\emph{Journal of the Royal Statistical Society, Series B},
- \bold{72}:417--473.
+ \bold{72}, 417--473.
R.D. Shah and R.J. Samworth (2013), Variable selection with error
control: another look at stability selection. \emph{Journal of the Royal
- Statistical Society, Series B}, \bold{75}:55--80.
+ Statistical Society, Series B}, \bold{75}, 55--80.
}
\examples{
Modified: pkg/mboostDevel/tests/Examples/mboostDevel-Ex.Rout.save
===================================================================
--- pkg/mboostDevel/tests/Examples/mboostDevel-Ex.Rout.save 2014-04-16 07:46:56 UTC (rev 768)
+++ pkg/mboostDevel/tests/Examples/mboostDevel-Ex.Rout.save 2014-06-23 13:59:44 UTC (rev 769)
@@ -1,7 +1,6 @@
-R version 2.15.2 (2012-10-26) -- "Trick or Treat"
-Copyright (C) 2012 The R Foundation for Statistical Computing
-ISBN 3-900051-07-0
+R version 3.1.0 (2014-04-10) -- "Spring Dance"
+Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -21,20 +20,32 @@
> pkgname <- "mboostDevel"
> source(file.path(R.home("share"), "R", "examples-header.R"))
> options(warn = 1)
+> base::assign(".ExTimings", "mboostDevel-Ex.timings", pos = 'CheckExEnv')
+> base::cat("name\tuser\tsystem\telapsed\n", file=base::get(".ExTimings", pos = 'CheckExEnv'))
+> base::assign(".format_ptime",
++ function(x) {
++ if(!is.na(x[4L])) x[1L] <- x[1L] + x[4L]
++ if(!is.na(x[5L])) x[2L] <- x[2L] + x[5L]
++ options(OutDec = '.')
++ format(x[1L:3L], digits = 7L)
++ },
++ pos = 'CheckExEnv')
+>
+> ### * </HEADER>
> library('mboostDevel')
Loading required package: parallel
This is mboostDevel 2.3-0. See ‘package?mboostDevel’ and the NEWS file
for a complete list of changes.
-Note: The default for the computation of the degrees of freedom has changed.
- For details see section ‘Global Options’ of ‘?bols’.
+
>
-> assign(".oldSearch", search(), pos = 'CheckExEnv')
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> cleanEx()
> nameEx("FP")
> ### * FP
>
> flush(stderr()); flush(stdout())
>
+> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: FP
> ### Title: Fractional Polynomials
> ### Aliases: FP
@@ -43,7 +54,7 @@
> ### ** Examples
>
>
-> data("bodyfat", package = "mboostDevel")
+> data("bodyfat", package = "TH.data")
> tbodyfat <- bodyfat
>
> ### map covariates into [1, 2]
@@ -121,17 +132,20 @@
>
>
>
+> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
+> base::cat("FP", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
> cleanEx()
> nameEx("Family")
> ### * Family
>
> flush(stderr()); flush(stdout())
>
+> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Family
> ### Title: Gradient Boosting Families
> ### Aliases: Family AdaExp Binomial GaussClass GaussReg Gaussian Huber
> ### Laplace Poisson GammaReg CoxPH QuantReg ExpectReg NBinomial PropOdds
-> ### Weibull Loglog Lognormal AUC Gehan
+> ### Weibull Loglog Lognormal AUC Gehan Hurdle Multinomial
> ### Keywords: models
>
> ### ** Examples
@@ -150,40 +164,34 @@
+ name = "My Gauss Variant")
+ }
>
+> ### fitting multinomial logit model via a linear array model
+> X0 <- K0 <- diag(nlevels(iris$Species) - 1)
+> colnames(X0) <- levels(iris$Species)[-nlevels(iris$Species)]
+> mlm <- mboost(Species ~ bols(Sepal.Length, df = 2) %O%
++ buser(X0, K0, df = 2), data = iris,
++ family = Multinomial())
+> head(round(predict(mlm, type = "response"), 2))
+ setosa versicolor virginica
+[1,] 0.61 0.23 0.16
+[2,] 0.69 0.19 0.12
+[3,] 0.76 0.15 0.09
+[4,] 0.79 0.13 0.08
+[5,] 0.65 0.21 0.14
+[6,] 0.48 0.30 0.23
>
>
>
-> cleanEx()
-> nameEx("Westbc")
-> ### * Westbc
>
-> flush(stderr()); flush(stdout())
>
-> ### Name: Westbc
-> ### Title: Breast Cancer Gene Expression
-> ### Aliases: Westbc
-> ### Keywords: datasets
->
-> ### ** Examples
->
->
-> ## Not run:
-> ##D library("Biobase")
-> ##D data("Westbc", package = "mboostDevel")
-> ##D westbc <- new("ExpressionSet",
-> ##D phenoData = new("AnnotatedDataFrame", data = Westbc$pheno),
-> ##D assayData = assayDataNew(exprs = Westbc$assay))
-> ##D
-> ## End(Not run)
->
->
->
+> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
+> base::cat("Family", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
> cleanEx()
> nameEx("baselearners")
> ### * baselearners
>
> flush(stderr()); flush(stdout())
>
+> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: baselearners
> ### Title: Base-learners for Gradient Boosting
> ### Aliases: bols bbs bspatial brad brandom btree bmono bmrf buser bns bss
@@ -205,43 +213,95 @@
>
> ### set up base-learners
> spline1 <- bbs(x1, knots = 20, df = 4)
-> attributes(spline1)
-$names
-[1] "model.frame" "get_call" "get_data" "get_index" "get_vary"
-[6] "get_names" "set_names" "dpp"
-
-$class
-[1] "blg"
-
->
+> extract(spline1, "design")[1:10, 1:10]
+ 1 2 3 4 5 6 7 8 9
+ [1,] 0 0 0 0 0.00000000 0.00000000 0.000000e+00 0.000000000 0.000000000
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/mboost -r 769
More information about the Mboost-commits
mailing list