Aan de slagGa gratis aan de slag

Build your first logistic regression model

In the video, we build a simple logistic regression model by using emp_age to predict turnover. In this exercise, you will build a similar model to predict turnover using percent_hike.

Also, as discussed in the video, we dropped the following columns from the dataset:

  • emp_id, mgr_id
  • date_of_joining, last_working_date, cutoff_date
  • mgr_age, emp_age
  • median_compensation,department
  • status

This new dataset is available in train_set_multi.

Deze oefening maakt deel uit van de cursus

HR Analytics: Predicting Employee Churn in R

Cursus bekijken

Oefeninstructies

  • Build a simple logistic regression model to predict turnover using percent_hike.
  • Print the summary of this model.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Build a simple logistic regression model
simple_log <- ___(___, 
                  family = "binomial", data = train_set_multi)

# Print summary
___(simple_log)
Code bewerken en uitvoeren