Book Image

Practical Predictive Analytics

By : Ralph Winters
Book Image

Practical Predictive Analytics

By: Ralph Winters

Overview of this book

This is the go-to book for anyone interested in the steps needed to develop predictive analytics solutions with examples from the world of marketing, healthcare, and retail. We'll get started with a brief history of predictive analytics and learn about different roles and functions people play within a predictive analytics project. Then, we will learn about various ways of installing R along with their pros and cons, combined with a step-by-step installation of RStudio, and a description of the best practices for organizing your projects. On completing the installation, we will begin to acquire the skills necessary to input, clean, and prepare your data for modeling. We will learn the six specific steps needed to implement and successfully deploy a predictive model starting from asking the right questions through model development and ending with deploying your predictive model into production. We will learn why collaboration is important and how agile iterative modeling cycles can increase your chances of developing and deploying the best successful model. We will continue your journey in the cloud by extending your skill set by learning about Databricks and SparkR, which allow you to develop predictive models on vast gigabytes of data.
Table of Contents (19 chapters)
Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Comparing the models


Even though the survival curves are similar, we can see that at the end of 12 months, 56% of the customers were retained, as opposed to the original 27%. We could attribute that to the intervention that took place at month 6.

Use the summary(survfit) function to compare the modes:

> summary(survfit(CoxModel.2))

Call: survfit(formula = CoxModel.2)

v

time n.risk n.event survival std.err lower 95% CI upper 95% CI

1 1488 15 0.994 0.00157 0.991 0.997

2 1455 52 0.973 0.00359 0.966 0.980

3 1393 34 0.958 0.00461 0.949 0.967

4 1342 20 0.950 0.00518 0.940 0.960

5 1315 39 0.932 0.00624 0.920 0.945

6 1245 42 0.913 0.00736 0.898 0.927

7 1156 24 0.898 0.00801 0.883 0.914

8 1020 32 0.877 0.00902 0.859 0.895

9 850 40 0.846 0.01052 0.825 0.866

10 665 51 0.797 0.01293 0.772 0.822

11 435 54 0.721 0.01688 0.688 0.755

12 225 55 0.569 0.02518 0.522 0.621

 

> summary(survfit(CoxModel.1))

Call: survfit(formula = CoxModel.1)

 

time n.risk n.event survival std.err lower 95% CI upper 95% CI

1 1488 15 0.993 0.00185...