Tahmin doğruluğunu kontrol etme
Artık eğitilmiş modelinin ne kadar iyi tahmin yaptığını kontrol etme zamanı! Test setini kullanarak, Decision Tree modelinin doğruluğunu score() metoduyla ölçelim.
Bu egzersiz, kursun bir parçasıdır
İK Analitiği: Python ile Çalışan Terkini (Churn) Tahmin Etme
Egzersiz talimatları
- Karar ağacı
modelini kullanarak eğitim setindefeaturesıtargeta uydur. - Eğitim seti için tahminin doğruluk
score()unu kontrol et. - Test seti için tahminin doğruluk
score()unu kontrol et.
Uygulamalı etkileşimli egzersiz
Bu egzersizi bu örnek kodu tamamlayarak deneyin.
# 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