Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
argument prediction is not passed in %O% #23
I think the bug can be fixed by setting
X1 <- newX1(as.data.frame(mf[bl1$get_names()]), prediction = args$prediction) X2 <- newX2(as.data.frame(mf[bl2$get_names()]), prediction = args$prediction)
In the following, a MWE is given were the problem occurs in predict().
library(mboost) ### kronecker product for matrix-valued responses data("volcano", package = "datasets") ## estimate mean of image treating image as matrix x1 <- 1:nrow(volcano) x2 <- 1:ncol(volcano) vol <- as.vector(volcano) mod <- mboost(vol ~ bbs(x1, df = 3, knots = 10)%O% bbs(x2, df = 3, knots = 10), control = boost_control(nu = 0.25)) ## use predict() with newdata that extrapolates the original variables ## does not work as the arument 'prediciton' is not passed in %O% temp <- matrix(predict(mod, newdata=list(x1=x1, x2=1:62)), nrow = nrow(volcano))
I suspect, that the same issue applies for