Deployment

As discussed earlier, MLlib supports model export to Predictive Model Markup Language (PMML). Therefore, we do export some developed models to PMML for this project. However, in practice, the users for this project are more interested in rule-based decision making to use some of our insights besides score-based decision making to prevent frauds.

As for this project, the client is interested in applying our results for the following:

  • Deciding what interventions to use for a combination of car products or services with a special customer segment
  • When the company needs to start some interventions depending on the customer churn score

Therefore, we need to produce a customer churn risk score for the client with which the client will start some intervention when the score is above a cutting value. At the same time, we need to use the results from our logistic regression to recommend interventions.

Note

For more on exporting results from MLlib to PMML, please go to https://spark.apache.org/docs/1.5.2/mllib-pmml-model-export.html.

Scoring

Similar to the deployment used in Chapter 5, Risk Scoring on Spark, here we can use the churn probabilities as our scores, and employ the same methods to obtain them:

// Compute raw scores on the test set.
val predictionAndLabels = test.map { case LabeledPoint(label, features) =>
  val prediction = model.predict(features)
  (prediction, label)
}

Intervention recommendations

From last section's work on results explanation, we also gain an understanding about which interventions as well as product or service features have bigger effects than the others. Therefore, we can make good recommendations based on them.

As for the client for this project, a good churn probability score and some recommendations satisfies them as this provides real help for them to improve customer loyalty.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.177.39