शुरू करेंमुफ़्त में शुरू करें

बेसलाइन

attrition_num डेटासेट के साथ आगे बढ़ते हुए, आप अतिरिक्त feature engineering चरणों के प्रभाव जाँचने के लिए एक साधारण recipe के साथ एक बेसलाइन बनाएँगे. attrition_num डेटा, logistic regression lr_model, यूज़र-परिभाषित class-evaluate() फंक्शन, और train तथा test स्प्लिट्स आपके लिए पहले से लोड हैं.

यह अभ्यास पाठ्यक्रम का हिस्सा है

R में Feature Engineering

पाठ्यक्रम देखें

अभ्यास निर्देश

  • मॉडल और recipe को एक workflow में bundle करें.
  • मूल्यांकन के लिए तैयार करने हेतु fitted workflow को augment करें.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

lr_recipe_plain <- recipe(Attrition ~., data = train)

# Bundle the model and recipe
lr_workflow_plain <- workflow() %>%
  ___(lr_model) %>%
  ___(lr_recipe_plain)
lr_fit_plain <- lr_workflow_plain %>%
  fit(train)

# Augment the fit workflow
lr_aug_plain <- lr_fit_plain %>%
  ___(___)
lr_aug_plain %>%
  class_evaluate(truth = Attrition,estimate = .pred_class,
                 .pred_No)
कोड संपादित करें और चलाएँ