Search code examples
rxgboostmlr3

mlr3proba surv.xgboost is not producing distr output + documentation link unstable


R version  used: 3.6.3, mlr3 version: 0.4.0-9000, mlr3proba version: 0.1.6.9000 and xgboost version: 0.90.0.2 (as stated on Rstudio package manager)

Unfortunately, when applying surv.xgboost for training and prediction, no distr output is produced as stated in the documentation: https://mlr3proba.mlr-org.com/reference/LearnerSurvXgboost.html, only crank and lp outputs are produced.

Also please note that the documentation link above is also unstable as it sometimes links to a new mlr3proba version 0.2.0 throwing a 404 error while other times it works and shows documentation notes for surv.xgboost as per mlr3proba 0.1.6.

Please let me know if you would like me to provide any further details concerning the issue. Thank you in advance for your time.


Solution

  • Hi thanks for using mlr3proba! Good spot on the documentation problem, I will get that fixed asap. xgboost does not natively predict distr, this is a mistake in the documentation. You can check this with LearnerSurvXgboost$new()$predict_types. However it is easy to get a distribution prediction:

    library(mlr3); library(mlr3proba); library(mlr3pipelines)
    learn = distrcompositor(lrn("surv.xgboost"), estimator = "kaplan", form = "ph")
    

    You could change the form and estimator arguments though as xgboost assumes a PH form these are the most sensible options.

    Let me know if the code chunk doesn't work for some reason, and if it does please mark as answered :)

    Raphael