Skip to content

Latest commit

 

History

History
executable file
·
21 lines (11 loc) · 1.65 KB

File metadata and controls

executable file
·
21 lines (11 loc) · 1.65 KB

CART Lab I (L03)

Download the repository as a zip folder and begin an R project for this lab. The zip folder will contain instructions (repeated below) and a template to get an Rmd file started.

Overview

There are two goals for this lab. The first is to continue practicing both the implementation of a consistent and organized style-guide and implementation of tidyverse coding enhancements to the base R code provided in the book. The second is to practice the application of tree-based methods (i.e., classification and regression trees).

Datasets

We will be utilizing the Carseats (carseats.csv) and Boston (boston.csv) datasets contained in the data subdirectory. While these datasets are included within R packages, students are expected to read in these datasets utilizing tidyverse technique. This may necessitate that students re-type variables. Students can access the appropriate codebook by using ?ISLR::Carseats or ?MASS::Boston.

Exercise

Please complete the following exercise.The document should be neatly formatted.

Exercise 1

Work through the entire lab in Section 8.3 Lab: Decision Trees (pages: 323 - 331) while attempting to utilize tidyverse techniques when possible.

While it might feel redundant to re-create code in a slightly different format, it is an extremely useful skill to practice. It is only really redundant because base R code is supplied. The base R code provides a good starting point for us to build upon and improve it by coverting it to a more flexible and organized format. Students should also consider adding their own notes and commentary to make this lab into a useful resource for the future.