BaşlayınÜcretsiz başlayın

Predicting churn

In this exercise, you will use the predict() function in the pROC package to predict the churn probability of the customers in the test set, test_set. The function has three arguments:

  1. The model used to make the predictions.
  2. newdata: The dataset the model should be applied to.
  3. type: the type of prediction. We want to know the probability of churn, so we choose either response or prob.

Use the function predict() to predict the churn probability of the customers in test_set.

Bu egzersiz, kursun bir parçasıdır

Predictive Analytics using Networked Data in R

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Load the package
library(pROC)

# Predict with the first model
firstPredictions <- predict(___, newdata = test_set, type = "response")
Kodu Düzenle ve Çalıştır