HRアナリティクス:Pythonで従業員離職を予測する
Hrant Davtyan
Assistant Professor of Data Science American University of Armenia
過学習の存在:
対策方法:
深さの制限
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アナリティクス:Pythonで従業員離職を予測する