I am running xgboost where objective is survival:cox and eval_metric is cox-nloglik. Y range from -800 to 800. However, predicted values are way to large in range from 10^3 to 10^13. I am not sure why is it ? what is outcome of cox regression in xgboost is.


In the documentation, you can find that the predictions are returned on the hazard ratio scale:

survival:cox Cox regression for right censored survival time data (negative values are considered right censored). Note that predictions are returned on the hazard ratio scale (i.e., as HR = exp(marginal_prediction) in the proportional hazard function h(t) = h0(t) * HR).

In other words, in a Cox proportional hazards rate model we have:


where $X$ in a traditional linear model is of the form $exp(b_1x_1+b_2x_2+...+b_px_p)$, and $h_0(t) = $ baseline hazard rate function. In the xgboost case with tree base learners, $X$ is the exponentiated prediction generated by the weighted sum of individual trees trained on the negative gradient of a loss function designed for survival data in particular.

In other words, the predicted values are not times of failure.

I find the xgboost documentation on the survival:cox setting to be extremely sparse and not well described. To my knowledge, I do not believe there exists an internal method to derive $h_0(t)$ for example.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.