Skip to content

Commit

Permalink
nicer printer
Browse files Browse the repository at this point in the history
  • Loading branch information
ja-thomas committed Aug 25, 2016
1 parent d62ff7d commit 674e677
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions R/cvrisk.nc_mboostLSS.R
Expand Up @@ -20,21 +20,15 @@ cvrisk.nc_mboostLSS <- function(object, folds = cv(model.weights(object)),
call <- deparse(attr(object, "call"))
oobrisk <- matrix(0, nrow = ncol(folds), ncol = length(grid))
if (trace)
cat("Starting cross-validation...\n",
"[fold]\t[current mstop]\n", sep = "")
cat("Starting cross-validation...")
if (is.null(fun)) {
dummyfct <- function(i, weights, oobweights) {
if (trace)
cat("\n[Fold: ", i, "]\n", sep = "")
## make model with new weights and max mstop
mod <- update(object, weights = weights, oobweights = oobweights,
risk = "oobag", trace = FALSE,
mstop = max(grid))

if (trace) {
txt <- paste0(" [", i, "]\t",
paste0("[", paste(mstop(mod), collapse = ","),
"]"), "\n")
cat(txt)
}
risk = "oobag",
mstop = max(grid), trace = trace)


risks <- attr(mod, "combined_risk")()[grid]
Expand Down

0 comments on commit 674e677

Please sign in to comment.