#### 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.
Title Page
Credits
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
Getting Started with Predictive Analytics
The Modeling Process
Inputting and Exploring Data
Introduction to Regression Algorithms
Introduction to Decision Trees, Clustering, and SVM
Using Survival Analysis to Predict and Analyze Customer Churn
Introduction to Spark Using R
Exploring Large Datasets Using Spark
Spark Machine Learning - Regression and Cluster Models
Spark Models – Rule-Based Learning

## 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)vtime n.risk n.event survival std.err lower 95% CI upper 95% CI1 1488 15 0.994 0.00157 0.991 0.9972 1455 52 0.973 0.00359 0.966 0.9803 1393 34 0.958 0.00461 0.949 0.9674 1342 20 0.950 0.00518 0.940 0.9605 1315 39 0.932 0.00624 0.920 0.9456 1245 42 0.913 0.00736 0.898 0.9277 1156 24 0.898 0.00801 0.883 0.9148 1020 32 0.877 0.00902 0.859 0.8959 850 40 0.846 0.01052 0.825 0.86610 665 51 0.797 0.01293 0.772 0.82211 435 54 0.721 0.01688 0.688 0.75512 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% CI1 1488 15 0.993 0.00185...