How to get MAE, MSE and MAPE of Random Survival Forests #447
Replies: 3 comments 8 replies
-
The metrics you mentioned are typically not used in survival analysis,
because they cannot deal with censored observations, hence they aren't
available in scikit-survival.
If you don't have censored observations, you don't need scikit-survival,
you can just use a regression model from scikit-learn.
|
Beta Was this translation helpful? Give feedback.
-
Interesting discussion - I do think that, strictly speaking, it can make sense to ask for these. Imagine a scenario in which none of your outcomes are censored, in this case survival models will still produce a probabilitsic regression prediction. That defines a distribution, which has a mean or location, for which it can make sense to request RMSE or MAE. Additionally, if your outcomes are censored, there are censored versions of the "classical" regression outcome metrics. They are a bit obscure, and have issues such as not being strictly proper (subject to reasonable definitions), but if the censoring fraction is low, it can still make sense. |
Beta Was this translation helpful? Give feedback.
-
You can, but it takes a little bit of work.
A Random Survival Forest predicts a survival function S(t), i.e. the
probability of experiencing an event up to time t. If you want to
compute the MAE with sklearn.metrics.mean_absolute_error you need to get
the time point where the survival function (via
predict_survival_function) reaches a pre-defined probability. For
instance, the median survival time would be the time point t where S(t)
= 0.5. Unfortunately, this functionality is not part of scikit-survival,
so you would need to implement that yourself.
|
Beta Was this translation helpful? Give feedback.
-
I need to get the mean absolute error(MAE), mean square error(MSE) and mean absolute percentage error(MAPE) as evaluation metrics. I want to know whether scikit-survival can achieve it. My data is uncensored duration. And I want to use random survival forest and random forest separately for prediction, and compare their prediction accuracy. I haved read this https://scikit-survival.readthedocs.io/en/v0.17.0/user_guide/evaluating-survival-models.html But I haven't found a way to implement it yet. Please help me! Thank you!
This is the implementation result I saw in someone else's paper, which is also what I want to achieve
Beta Was this translation helpful? Give feedback.
All reactions