ขั้นตอนสุดท้ายสู่ความสำเร็จ

HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย R

Anurag Gupta

People Analytics Practitioner

สร้างโมเดลขั้นสุดท้าย

# Final model, you will complete this in the next exercise
final_log <- glm(...)
HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย R

ทำนายความน่าจะเป็นของการลาออก

# 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: การพยากรณ์การลาออกของพนักงานด้วย R

พล็อตช่วงความน่าจะเป็น: ชุดข้อมูลฝึก

# Look at the predictions range
hist(prediction_train)

HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย R

ทำนายความน่าจะเป็น: ชุดข้อมูลทดสอบ

# 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: การพยากรณ์การลาออกของพนักงานด้วย R

พล็อตช่วงความน่าจะเป็น: ชุดข้อมูลทดสอบ

# Look at the predictions range
hist(prediction_test)

HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย R

มาฝึกกันเถอะ!

HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย R

Preparing Video For Download...