O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Predicting the outcome at time 6

The predictions are in log form. Take the exponent and multiply by the base hazard estimate to obtain the predicted value at 6 months:

#head(pred_validation)#                                                                                      pred.val <- base[6,1]*exp(pred_validation)

Let's assume we want to predict the risk of churn that occurs halfway through the analysis period (time=6):

First, we will first take the exponents of the prediction and multiply them by the base hazard estimate that was shown in the hazard column at time=6. This method, in effect, adds the predictive power of the coefficients to the base hazard rate:

pred.val <- base[6,1]*exp(pred_validation)

We will now merge the predicted values in with the raw values from the test dataset and view the results after verifying ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required