boost-R / mboost

Boosting algorithms for fitting generalized linear, additive and interaction models to potentially high-dimensional data. The current relase version can be found on CRAN (http://cran.r-project.org/package=mboost).
73 stars 27 forks source link

deprecate argument 'constraint' in bbs() #36

Closed sbrockhaus closed 8 years ago

sbrockhaus commented 8 years ago

As @hofnerb pointed out that bbs() with argument constraint should not be used for decreasing or increasing effects, this argument should be deprecated. Instead bmono() can be used.

Consider an example where the true function is not monotonic:

library(mboost)

x <- sort(rnorm(100))
y <- x^2
y <- y - mean(y)
dat <- data.frame(y = y, x = x)

m <- mboost(y ~ bbs(x), data = dat)
m_bbs <- mboost(y ~ bbs(x, constraint = "increasing"), data = dat)
m_bmono <- mboost(y ~ bmono(x, constraint = "increasing"), data = dat)

par(mfrow = c(1,3))
plot(m, main = "bbs(x)"); lines(x, y, col=2)
plot(m_bbs, main = "bbs(x, constraint = \"increasing\")"); lines(x, y, col=2)
plot(m_bmono, main = "bmono(x, constraint = \"increasing\")"); lines(x, y, col=2)

@Almond-S

hofnerb commented 8 years ago

We now discourage using bbs(, constraint != "none"); However, we cannot remove this functionality as other code and other packages (ctm) rely on it.