Závěrečné kroky k dokonalosti

HR Analytics: Predicting Employee Churn in R

Anurag Gupta

People Analytics Practitioner

Sestavení finálního modelu

# Final model, you will complete this in the next exercise
final_log <- glm(...)
HR Analytics: Predicting Employee Churn in R

Predikce pravděpodobnosti odchodu

# Make predictions for training dataset
prediction_train <- predict(final_log, newdata = train_set_final, 
                            type = "response")
prediction_train[c(205, 645)]
       205        645 
0.06069079 0.99999898
HR Analytics: Predicting Employee Churn in R

Rozsah pravděpodobností: trénovací dataset

# Look at the predictions range
hist(prediction_train)

HR Analytics: Predicting Employee Churn in R

Predikce pravděpodobnosti: testovací dataset

# Make predictions for testing dataset
# test_set is the test dataset from chapter 3 exercise 2
prediction_test <- predict(final_log, newdata = test_set, 
                           type = "response")
HR Analytics: Predicting Employee Churn in R

Rozsah pravděpodobností: testovací dataset

# Look at the predictions range
hist(prediction_test)

HR Analytics: Predicting Employee Churn in R

Pojďme procvičovat!

HR Analytics: Predicting Employee Churn in R

Preparing Video For Download...