การปรับจูน Classifier การลาออกของพนักงาน

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

Hrant Davtyan

Assistant Professor of Data Science American University of Armenia

Overfitting

สัญญาณของ Overfitting:

  • ความแม่นยำบนชุด Train: 100%
  • ความแม่นยำบนชุด Test: 97.23%

วิธีแก้ไข:

  • จำกัดความลึกสูงสุดของต้นไม้
  • จำกัดขนาดตัวอย่างขั้นต่ำในใบ
HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย Python

การตัดแต่งต้นไม้

จำกัดความลึก

model_depth_5 = DecisionTreeClassifier(
                max_depth=5, random_state=42)
# Train set Accuracy: 97.71%
# Test  set Accuracy: 97.06%

จำกัดจำนวนตัวอย่าง

model_sample_100 = DecisionTreeClassifier(
                   min_samples_leaf=100, random_state=42)
# Train set Accuracy: 96.58%
# Test set Accuracy: 96.13%
HR Analytics: การพยากรณ์การลาออกของพนักงานด้วย Python

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

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

Preparing Video For Download...