Skip to content

Commit

Permalink
speed-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Hothorn committed Apr 8, 2022
1 parent cd63c28 commit f2917e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
\subsection{Bug-fixes}{
\itemize{
\item Fix BLAS problem.
\item More \dontrun's in manual packages
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion man/Family.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ y <- M / (M + U)
## fit RCG model
data <- data.frame(y, x1, x2)
RCGmodel <- glmboost(y ~ x1 + x2, data = data, family = RCG(),
control = boost_control(mstop = 2000,
control = boost_control(mstop = 1000,
trace = TRUE, nu = 0.01))
## true coefficients: gamma = (0.0, 0.4, -0.7),
## alpha (= shape) = 2,
Expand Down
2 changes: 2 additions & 0 deletions man/baselearners.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,9 @@ bl1 \%O\% bl2

mod2 <- gamboost(form2)
## automated plot function:
\dontrun{
plot(mod2)
}
## plot sum of linear and smooth effects:
library("lattice")
df <- expand.grid(x1 = unique(x1), x2 = unique(x2))
Expand Down
8 changes: 6 additions & 2 deletions man/mboost_package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,12 @@ License: \tab GPL-2\cr
bbs(kneebreadth), ### a smooth function of kneebreadth
data = bodyfat, control = boost_control(mstop = 100))

### bootstrap for assessing `optimal' number of boosting iterations
cvm <- cvrisk(model, papply = lapply)
### 10-fold cv for assessing `optimal' number of boosting iterations
cvm <- cvrisk(model, papply = lapply,
folds = cv(model.weights(model), type = "kfold"))
### probably needs larger initial mstop but the
### CRAN team is picky about running times for examples
plot(cvm)

### restrict model to mstop(cvm)
model[mstop(cvm), return = FALSE]
Expand Down

0 comments on commit f2917e8

Please sign in to comment.