HR Analytics: Predicting Employee Churn in Python
Hrant Davtyan
Assistant Professor of Data Science American University of Armenia
Přítomnost přeučení:
Metody pro boj s přeučením:
Omezení hloubky
model_depth_5 = DecisionTreeClassifier(
max_depth=5, random_state=42)
# Train set Accuracy: 97.71%
# Test set Accuracy: 97.06%
Omezení vzorků
model_sample_100 = DecisionTreeClassifier(
min_samples_leaf=100, random_state=42)
# Train set Accuracy: 96.58%
# Test set Accuracy: 96.13%
HR Analytics: Predicting Employee Churn in Python