DAT 520 Problem Set 4 Introductory Decision Trees
Problem 1: Cartfit Decision Tree: To complete this problem, you will need to read and follow an example. In following the example, you can simply cut and paste the commands, however the intended goals of this problem is to learn and understand how and why this decision is working and used. The steps for this problem are as follows:
1. Read Chapter 8 of the Larose text, "What Is a Decision Tree?"
2. Complete the R Zone exercise found on pages 180 and 181 of the reading.
3. Copy and Paste the R Zone decision tree you generate in R into a Word document.
4. Include an explanation of what this decision tree is telling you
The steps to complete this assignment are outlined here. These are provided to guide you through the problem. Note that in practice, you would be expected to know how to perform your own analysis, so making notes as you perform the exercise will be helpful in your use of these methods.
1. Open R.
2. Open the notepad file Module4_Problem1.txt (found in DAT 520 Data Files folder).
a. This text file contains the text commands listed in the RZone example. The commands have the extraneous characters removed from PDF copy pasting as well as points to the proper csv file for this assignment. If you choose to perform the assignment independent of these instructions, please see the problem notes below for additional details.
3. Each step begins with a # which is a comment identifier in R. Note: the first couple of instructions is to identify the file path and to then read in the file. You can copy all lines including the # if you want the R command execution will ignore the # line. Paste it into your R console and hit return. The command set should complete fine. If you encounter an error, please review the problem notes found below. Continue working through the file until all commands have been run from the example assignment and you have produced your tree.
4. Right-click on the tree image produced and copy it as a bitmap (image) into Word.
5. Write your explanation of what this tree is telling you.
6. Save the file. You will continue to use this file to add the results of Problem 2 and Problem 3 as well.