Session Ready
Exercise

Split the data

In this exercise, you will split your data into training and test sets using the caret package. In the next set of lessons, you will use the training set to build logistic regression models and use the test set to validate these models.

Instructions
100 XP
  • Load the caret package.
  • Set a seed of 567 and create a data partition that divides the dataset emp_final into 70% / 30% train/test sections.
  • Create the training dataset by selecting the row numbers stored in index_train from the dataset emp_final.
  • Assign the remaining observations from emp_final to the testing set.