xgboost
functions expect a certain type of label
vector for certain problem types. For survival models, xgboost
labels should be time-to-event values with negative times
indicating censored observations and postive times indicating
events.
sgb_label(time, status)
time | a numeric vector with time-to-event values. |
---|---|
status | a numeric vector of 0s and 1s, where 0 indicates censoring and 1 indicates that the event occurred. |
#> [1] 1 -2 3