[Mboost-commits] r835 - in pkg/mboostDevel: . R inst man tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 13 09:48:04 CET 2015
Author: hofner
Date: 2015-02-13 09:48:03 +0100 (Fri, 13 Feb 2015)
New Revision: 835
Modified:
pkg/mboostDevel/DESCRIPTION
pkg/mboostDevel/NAMESPACE
pkg/mboostDevel/R/AAA.R
pkg/mboostDevel/R/bl.R
pkg/mboostDevel/R/bmono.R
pkg/mboostDevel/R/bmrf.R
pkg/mboostDevel/R/brad.R
pkg/mboostDevel/R/btree.R
pkg/mboostDevel/inst/CITATION
pkg/mboostDevel/inst/NEWS.Rd
pkg/mboostDevel/man/blackboost.Rd
pkg/mboostDevel/man/mboost_package.Rd
pkg/mboostDevel/man/methods.Rd
pkg/mboostDevel/tests/bugfixes.R
Log:
merged changes of mboost 2.4-2 to mboostDevel
Modified: pkg/mboostDevel/DESCRIPTION
===================================================================
--- pkg/mboostDevel/DESCRIPTION 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/DESCRIPTION 2015-02-13 08:48:03 UTC (rev 835)
@@ -1,7 +1,7 @@
Package: mboostDevel
Title: Model-Based Boosting
Version: 2.5-0
-Date: 2014-xx-yy
+Date: 2015-xx-yy
Authors at R: c(person("Torsten", "Hothorn", role = c("aut", "cre"),
email = "Torsten.Hothorn at R-project.org"),
person("Peter", "Buehlmann", role = "aut"),
@@ -15,10 +15,10 @@
component-wise (penalised) least squares estimates or regression
trees as base-learners for fitting generalized linear, additive
and interaction models to potentially high-dimensional data.
-Depends: R (>= 2.14.0), methods, stats, parallel, stabs
+Depends: R (>= 2.14.0), methods, stats, parallel, stabs (>= 0.5-0)
Imports: Matrix, survival, splines, lattice, nnls, quadprog, utils
Suggests: party (>= 1.0-3), TH.data, MASS, fields, BayesX, gbm, mlbench,
- RColorBrewer, rpart (>= 4.0-3)
+ RColorBrewer, rpart (>= 4.0-3), randomForest, nnet
LazyData: yes
License: GPL-2
URL: http://mboost.r-forge.r-project.org/
Modified: pkg/mboostDevel/NAMESPACE
===================================================================
--- pkg/mboostDevel/NAMESPACE 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/NAMESPACE 2015-02-13 08:48:03 UTC (rev 835)
@@ -21,9 +21,12 @@
ExpectReg, NBinomial, PropOdds, Weibull, Loglog, Lognormal, AUC, mboost_fit,
Huber, AdaExp, Gehan, CoxPH, Hurdle, Multinomial, FP, IPCweights,
cvrisk, cv, bbs,
- bols, bspatial, brandom, btree, bss, bns, brad, bmono, bmrf, buser, survFit, selected.mboost,
+ bols, bspatial, brandom, btree, bss, bns, brad, bmono, bmrf, buser,
+ survFit, selected, selected.mboost,
nuisance, "%+%", "%X%", "%O%", extract, risk, "mstop<-",
- stabsel.mboost, stabsel_parameters.mboost, confint.mboost, confint.glmboost)
+ stabsel.mboost, stabsel_parameters.mboost, confint.mboost, confint.glmboost,
+ ## exports to make FDboost happy:
+ df2lambda, hyper_bbs, bl_lin)
###, basesel, fitsel)
exportClasses("boost_family")
exportMethods("show")
Modified: pkg/mboostDevel/R/AAA.R
===================================================================
--- pkg/mboostDevel/R/AAA.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/R/AAA.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -29,7 +29,8 @@
vers <- packageDescription("mboostDevel")[["Version"]]
packageStartupMessage("This is mboostDevel ", vers, ". ", "See ",
- sQuote("package?mboostDevel"), " and the NEWS file\n",
+ sQuote("package?mboostDevel"), " and ",
+ sQuote('news(package = "mboostDevel")'), "\n",
"for a complete list of changes.\n",
appendLF = TRUE)
return(TRUE)
Modified: pkg/mboostDevel/R/bl.R
===================================================================
--- pkg/mboostDevel/R/bl.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/R/bl.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -287,7 +287,7 @@
### L = \Gamma \Omega^1/2 in Section 2.3. of
### Fahrmeir et al. (2004, Stat Sinica)
"spectralDecomp" = {
- SVD <- eigen(crossprod(K), symmetric = TRUE, EISPACK = FALSE)
+ SVD <- eigen(crossprod(K), symmetric = TRUE)
ev <- SVD$vector[, 1:(ncol(X) - args$differences), drop = FALSE]
ew <- SVD$values[1:(ncol(X) - args$differences), drop = FALSE]
X %*% ev %*% diag(1/sqrt(ew))
@@ -360,7 +360,7 @@
if (!identical(args$center, FALSE)) {
### L = \Gamma \Omega^1/2 in Section 2.3. of Fahrmeir et al.
### (2004, Stat Sinica), always
- L <- eigen(K, symmetric = TRUE, EISPACK = FALSE)
+ L <- eigen(K, symmetric = TRUE)
L$vectors <- L$vectors[,1:(ncol(X) - args$differences^2), drop = FALSE]
L$values <- sqrt(L$values[1:(ncol(X) - args$differences^2), drop = FALSE])
L <- L$vectors %*% (diag(length(L$values)) * (1/L$values))
@@ -561,7 +561,6 @@
### cyclic B-splines
### adapted version of mgcv:cSplineDes from S.N. Wood
cbs <- function (x, knots, boundary.knots, degree = 3, deriv = 0L) {
- # require(splines)
nx <- names(x)
x <- as.vector(x)
## handling of NAs
Modified: pkg/mboostDevel/R/bmono.R
===================================================================
--- pkg/mboostDevel/R/bmono.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/R/bmono.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -144,7 +144,7 @@
args$type <- type
args$lambda2 <- lambda2
args$niter <- niter
- ## <FIXME> Was machen wir bei kateg. Effekten? Da müsste das doch auch gehen!
+ ## <FIXME> Was machen wir bei kateg. Effekten? Da muesste das doch auch gehen!
args$boundary.constraints <- boundary.constraints
args$cons.arg$n <- cons.arg$n
ret$dpp <- bl_mono(ret, Xfun = X_ols,
Modified: pkg/mboostDevel/R/bmrf.R
===================================================================
--- pkg/mboostDevel/R/bmrf.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/R/bmrf.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -2,7 +2,7 @@
function (..., by = NULL, index = NULL, bnd = NULL, df = 4, lambda = NULL,
center = FALSE)
{
- if (!require("BayesX"))
+ if (!requireNamespace("BayesX"))
stop("cannot load ", sQuote("BayesX"))
cll <- match.call()
@@ -97,7 +97,7 @@
if (isTRUE(args$center)) {
### L = \Gamma \Omega^1/2 in Section 2.3. of Fahrmeir et al.
### (2004, Stat Sinica)
- SVD <- eigen(K, EISPACK = FALSE)
+ SVD <- eigen(K)
ev <- SVD$vectors[, -dim(SVD$vectors)[2]]
ew <- SVD$values[-length(SVD$values)]
X <- as(X %*% ev %*% diag(1/sqrt(ew)), "matrix")
Modified: pkg/mboostDevel/R/brad.R
===================================================================
--- pkg/mboostDevel/R/brad.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/R/brad.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -2,9 +2,6 @@
covFun = fields::stationary.cov,
args = list(Covariance = "Matern", smoothness = 1.5, theta = NULL)) {
- # if (!require("fields"))
- # stop("cannot load ", sQuote("fields"))
-
cll <- match.call()
cll[[1]] <- as.name("brad")
@@ -116,7 +113,7 @@
## first we need to build a correct matrix of mf
x <- as.matrix(mf[which(colnames(mf) != vary)])
if (length(knots) == 1) {
- if (!require("fields"))
+ if (!requireNamespace("fields"))
stop("Cannot load package", sQuote("fields"),
", which is needed for the automatic knot placement")
knots <- fields::cover.design(R = unique(x), nd = knots)$design
Modified: pkg/mboostDevel/R/btree.R
===================================================================
--- pkg/mboostDevel/R/btree.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/R/btree.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -6,7 +6,7 @@
mincriterion = 0,
savesplitstats = FALSE)) {
- if (!require("party"))
+ if (!requireNamespace("party"))
stop("cannot load ", sQuote("party"))
cll <- match.call()
Modified: pkg/mboostDevel/inst/CITATION
===================================================================
--- pkg/mboostDevel/inst/CITATION 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/inst/CITATION 2015-02-13 08:48:03 UTC (rev 835)
@@ -1,28 +1,28 @@
- citHeader("To cite package 'mboostDevel' in publications use:")
+citHeader("To cite package 'mboost' in publications use:")
- desc <- packageDescription("mboostDevel")
- year <- sub("(2[[:digit:]]{3})-.*-.*", "\\1", desc$Date)
- vers <- paste("R package version", desc$Version)
+year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
+vers <- paste("R package version", meta$Version)
- citEntry(entry="Manual",
- title = "{mboost}: Model-Based Boosting",
- author = personList(as.person("Torsten Hothorn"),
- as.person("Peter Buehlmann"),
- as.person("Thomas Kneib"),
- as.person("Matthias Schmid"),
- as.person("Benjamin Hofner")),
- year = year,
- note = vers,
- url = "http://CRAN.R-project.org/package=mboost",
- textVersion =
- paste("T. Hothorn, P. Buehlmann, T. Kneib, M. Schmid, and B. Hofner (",
- year,
- "). mboost: Model-Based Boosting, ",
- vers, ", http://CRAN.R-project.org/package=mboost", ".",
- sep=""))
+citEntry(entry="Manual",
+ title = "{mboost}: Model-Based Boosting",
+ author = personList(as.person("Torsten Hothorn"),
+ as.person("Peter Buehlmann"),
+ as.person("Thomas Kneib"),
+ as.person("Matthias Schmid"),
+ as.person("Benjamin Hofner")),
+ year = year,
+ note = paste("{R} package version", vers),
+ url = "http://CRAN.R-project.org/package=mboost",
+ textVersion =
+ paste("T. Hothorn, P. Buehlmann, T. Kneib, M. Schmid, and B. Hofner (",
+ year,
+ "). mboost: Model-Based Boosting, ",
+ paste("R package version", vers),
+ ", http://CRAN.R-project.org/package=mboost", ".",
+ sep=""))
- citEntry(entry="Article",
+citEntry(entry="Article",
title = "Boosting Algorithms: Regularization, Prediction and Model Fitting (with Discussion)",
author = personList(as.person("Peter Buehlmann"), as.person("Torsten Hothorn")),
journal = "Statistical Science",
@@ -35,4 +35,27 @@
paste("Peter Buehlmann and Torsten Hothorn (2007).",
"Boosting Algorithms: Regularization, Prediction and Model Fitting (with Discussion).",
"Statistical Science, 22(4), 477-505."),
- )
+ )
+
+citEntry(entry="Article",
+ title = "Model-based Boosting 2.0",
+ author = personList(as.person("Torsten Hothorn"),
+ as.person("Peter Buehlmann"),
+ as.person("Thomas Kneib"),
+ as.person("Matthias Schmid"),
+ as.person("Benjamin Hofner")),
+ journal = "Journal of Machine Learning Research",
+ year = "2010",
+ volume = "11",
+ pages = "2109--2113",
+
+ textVersion =
+ paste("Torsten Hothorn, Peter Buehlmann, Thomas Kneib,",
+ "Matthias Schmid and Benjamin Hofner (2010).",
+ "Model-based Boosting 2.0.",
+ "Journal of Machine Learning Research, 11, 2109-2113."
+ ),
+ )
+
+
+citFooter('Use ', sQuote('toBibtex(citation("mboost"))'), ' to extract BibTeX references.')
Modified: pkg/mboostDevel/inst/NEWS.Rd
===================================================================
--- pkg/mboostDevel/inst/NEWS.Rd 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/inst/NEWS.Rd 2015-02-13 08:48:03 UTC (rev 835)
@@ -19,25 +19,55 @@
}
}
-\section{Changes in mboost version 2.4-1 (2014-xx-yy)}{
-\subsection{User-visible changes}{
+\section{Changes in mboost version 2.4-2 (2014-02-12)}{
+ \subsection{User-visible changes}{
\itemize{
- \item Moved generic definition of \code{selected} to \pkg{stabs}
- which is required anyway.
+ \item Export \code{df2lambda}, \code{hyper_bbs} and \code{bl_lin}
+ to make package \pkg{FDboost} happy. Note: These functions
+ usually should not be called directly by users.
}
}
\subsection{Miscellaneous}{
\itemize{
- \item load AML dataset from package TH.data
+ \item Added Hothorn et al (2010) to \file{inst/CITATION}
}
}
\subsection{Bug-fixes}{
\itemize{
+ \item Changes in \file{inst/CITATION} to make CRAN happy:
+ Citations can now be extracted without the need to install the
+ package.
+ \item Removed \code{EISPACK = FALSE} from \code{eigen()} as the
+ argument is defunct and ignored.
+ \item Changed \code{require} to \code{requireNamespace}
+ }
+ }
+}
+
+\section{Changes in mboost version 2.4-1 (2014-12-15)}{
+ \subsection{Miscellaneous}{
+ \itemize{
+ \item Moved generic definition of \code{selected} to \pkg{stabs}
+ which is required anyway (thus, \pkg{stabs} >= 0.5-0 is now
+ required)
+ \item load AML dataset (\file{AML_Bullinger.rda}) from package
+ \pkg{TH.data}
+ \item Updated references (for stability selection, confidence
+ intervals and constrained regression)
+ \item fixed \file{inst/CITATION}
+ \item Refer to \code{news(package = "mboost")} instead of to the
+ \file{NEWS} file.
+ }
+ }
+ \subsection{Bug-fixes}{
+ \itemize{
\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>)
+ \item Examples in \code{\\dontrun} are now executable and all
+ dependencies are properly stated in \file{DESCRIPTION}
}
}
}
Modified: pkg/mboostDevel/man/blackboost.Rd
===================================================================
--- pkg/mboostDevel/man/blackboost.Rd 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/man/blackboost.Rd 2015-02-13 08:48:03 UTC (rev 835)
@@ -81,16 +81,17 @@
\code{\link[mboostDevel]{methods}}}
\examples{
- ### a simple two-dimensional example: cars data
- cars.gb <- blackboost(dist ~ speed, data = cars,
- control = boost_control(mstop = 50))
- cars.gb
+### a simple two-dimensional example: cars data
+cars.gb <- blackboost(dist ~ speed, data = cars,
+ control = boost_control(mstop = 50))
+cars.gb
- ### plot fit
- plot(dist ~ speed, data = cars)
- lines(cars$speed, predict(cars.gb), col = "red")
+### plot fit
+plot(dist ~ speed, data = cars)
+lines(cars$speed, predict(cars.gb), col = "red")
- ### set up and plot additive tree model
+### set up and plot additive tree model
+if (require("party")) {
ctrl <- ctree_control(maxdepth = 3)
viris <- subset(iris, Species != "setosa")
viris$Species <- viris$Species[, drop = TRUE]
@@ -101,6 +102,7 @@
data = viris, family = Binomial())[500]
layout(matrix(1:4, ncol = 2))
plot(imod)
+}
}
\keyword{models}
Modified: pkg/mboostDevel/man/mboost_package.Rd
===================================================================
--- pkg/mboostDevel/man/mboost_package.Rd 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/man/mboost_package.Rd 2015-02-13 08:48:03 UTC (rev 835)
@@ -19,7 +19,7 @@
Package: \tab mboost\cr
Type: \tab Package\cr
Version: \tab 2.5-0\cr
-Date: \tab 2014-xx-yy\cr
+Date: \tab 2015-xx-yy\cr
License: \tab GPL-2\cr
LazyLoad: \tab yes\cr
LazyData: \tab yes\cr
@@ -49,6 +49,9 @@
determine an appropriate model complexity. This task is the responsibility
of the data analyst.
+ A description of novel features that were introduced in version 2.0 is
+ given in Hothorn et. al (2010).
+
Hofner et al. (2014) present a comprehensive hands-on tutorial for using the
package \code{mboost}, which is also available as
\code{vignette(package = "mboost", "mboost_tutorial")}.
@@ -68,8 +71,8 @@
\pkg{stabs}, which now also implements an iterface to use stability
selection with other fitting functions. A generic function for
\code{"mboost"} models is implemented in \pkg{mboost}.
-
- For more changes see NEWS file.
+
+ \bold{For more changes see}\cr\code{news(Version >= "2.4-0", package = "mboostDevel")}
}
\section{NEWS in 2.3-series}{
@@ -93,7 +96,7 @@
(based on out-of-bag data) during fitting to \code{boost_control}.
}
- For more changes see NEWS file.
+ \bold{For more changes see}\cr\code{news(Version >= "2.3-0", package = "mboostDevel")}
}
\section{NEWS in 2.2-series}{
@@ -124,7 +127,7 @@
boundaries (per default).
}
- For more changes see NEWS file.
+ \bold{For more changes see}\cr\code{news(Version >= "2.2-0" & Version < "2.3-0", package = "mboostDevel")}
}
\section{NEWS in 2.1-series}{
@@ -138,7 +141,7 @@
Starting from this version, we now also automatically center the
variables in \code{\link{glmboost}} (argument \code{center = TRUE}).
- A complete list of changes can be found in the NEWS file.
+ \bold{For more changes see}\cr\code{news(Version >= "2.1-0" & Version < "2.2-0", package = "mboostDevel")}
}
\section{NEWS in 2.0-series}{
@@ -168,6 +171,8 @@
The most important advancement is a generic implementation
of the optimizer in function \code{\link{mboost_fit}}.
+ \bold{For more changes see}\cr\code{news(Version >= "2.0-0" & Version < "2.1-0", package = "mboostDevel")}
+
}
\author{
Torsten Hothorn \email{Torsten.Hothorn at R-project.org},\cr
Modified: pkg/mboostDevel/man/methods.Rd
===================================================================
--- pkg/mboostDevel/man/methods.Rd 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/man/methods.Rd 2015-02-13 08:48:03 UTC (rev 835)
@@ -45,6 +45,7 @@
\alias{hatvalues.gamboost}
\alias{hatvalues.glmboost}
+\alias{selected}
\alias{selected.mboost}
\alias{nuisance}
Modified: pkg/mboostDevel/tests/bugfixes.R
===================================================================
--- pkg/mboostDevel/tests/bugfixes.R 2015-02-13 08:47:59 UTC (rev 834)
+++ pkg/mboostDevel/tests/bugfixes.R 2015-02-13 08:48:03 UTC (rev 835)
@@ -215,15 +215,17 @@
stopifnot(max(abs(predict(x[i]) - predict(x[max(s)], agg = "cumsum")[,i])) < eps)
### make sure environment(formula) is used for evaluation
-data("cars")
-ctl <- boost_control(mstop = 100, trace = TRUE)
-tctl <- ctree_control(teststat = "max", testtype = "Teststat",
- mincrit = 0, maxdepth = 5, savesplitstat = FALSE)
-myfun <- function(cars, xx, zz){
- mboost(dist ~ btree(speed, tree_controls = zz),
- data = cars, control = xx)
+if (require("party")) {
+ data("cars")
+ ctl <- boost_control(mstop = 100, trace = TRUE)
+ tctl <- ctree_control(teststat = "max", testtype = "Teststat",
+ mincrit = 0, maxdepth = 5, savesplitstat = FALSE)
+ myfun <- function(cars, xx, zz){
+ mboost(dist ~ btree(speed, tree_controls = zz),
+ data = cars, control = xx)
+ }
+ try(mod <- myfun(cars, xx = ctl, zz = tctl))
}
-try(mod <- myfun(cars, xx = ctl, zz = tctl))
### bbs with weights and expanded data
x <- runif(100)
More information about the Mboost-commits
mailing list