Closed lzxcvn closed 6 months ago
I've tried to reproduce the error and found that it is rather not related to survex
package itself. It stems from mlr3proba
and mboost
used underneath. Not sure how your surv_pred
function look like but I see it uses the $predict_newdata
method (line 16.), which gives this error when predicting for one observation represented as one row of data.frame
, even outside the survex
.
The solution would be to use another model from mlr3proba
and report this error.
survex
我尝试重现该错误,发现它与包本身无关。它源自mlr3proba
并mboost
在下面使用。不确定你的surv_pred
函数是什么样的,但我看到它使用了$predict_newdata
方法(第 16 行),该方法在预测表示为一行的一个观察值时给出此错误data.frame
,即使在survex
.解决方案是使用另一个模型
mlr3proba
并报告此错误。
Thank you for your reply. After switching to another function, this issue was resolved. It seems that each learner has its own applicable function.
I encountered the following error while explaining the mboost learner for the MLR3 package. What is the reason for this?
![image](https://github.com/ModelOriented/survex/assets/104612436/be544318-84cf-41e9-af3a-df900bf7beee)