We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the args of hyper_bbs() the argument prediction is used to tell the base-learner when the model is fitted and when it is just used for prediction. I just realized that this argument is not passed when the base-learner is used in combination with %O%, as the argument is not passed in newX1 and newX2, in the code lines https://github.com/hofnerb/mboost/blob/master/pkg/mboostPatch/R/bkronecker.R#L244 https://github.com/hofnerb/mboost/blob/master/pkg/mboostPatch/R/bkronecker.R#L254
args
hyper_bbs()
prediction
%O%
newX1
newX2
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)
respectively.
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 %X% and %+%, as in those functions prediction is not passed explicitly either, see e.g. , https://github.com/hofnerb/mboost/blob/master/pkg/mboostPatch/R/bl.R#L1088 However, I did not check in that cases.
%X%
%+%
The text was updated successfully, but these errors were encountered:
95f19e7
No branches or pull requests
In the
args
ofhyper_bbs()
the argumentprediction
is used to tell the base-learner when the model is fitted and when it is just used for prediction.I just realized that this argument is not passed when the base-learner is used in combination with
%O%
, as the argument is not passed innewX1
andnewX2
, in the code lineshttps://github.com/hofnerb/mboost/blob/master/pkg/mboostPatch/R/bkronecker.R#L244
https://github.com/hofnerb/mboost/blob/master/pkg/mboostPatch/R/bkronecker.R#L254
I think the bug can be fixed by setting
respectively.
In the following, a MWE is given were the problem occurs in predict().
I suspect, that the same issue applies for
%X%
and%+%
, as in those functionsprediction
is not passed explicitly either, see e.g. ,https://github.com/hofnerb/mboost/blob/master/pkg/mboostPatch/R/bl.R#L1088
However, I did not check in that cases.
The text was updated successfully, but these errors were encountered: