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

Checking the accuracy of prediction

It’s now time to check how well your trained model can make predictions! Let’s use your testing set to check the accuracy of your Decision Tree model, with the score() method.

Bu egzersiz

HR Analytics: Predicting Employee Churn in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Apply the decision tree model to fit the features to the target in the training set.
  • Check the accuracy score() of the prediction for the training set.
  • Check the accuracy score() of the prediction for the test set.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Apply a decision tree model to fit features to the target in the training set
model.fit(____,____)

# Check the accuracy score of the prediction for the training set
model.____(features_train,____)*100

# Check the accuracy score of the prediction for the test set
model.____(____,____)*100
Kodu Düzenle ve Çalıştır