Skip to content

JA5. Decision Trees

Statement

Your learning journal entry must be a reflective statement that considers the following questions:

1. Describe what you did

This was the 5th week of this course, it was about decision trees. I started the week as usual by trying the self-quiz then I watched the lecture videos and started to read the text; the text size for this week was reasonable and I was able to finish it. Later, I did the discussion and programming assignments; and finally I am preparing the learning journal.

The reading (skimming) took about 6 - 8 hours, the discussion assignment took about 2 - 3 hours, and I spent about 4 hours on the programming assignment.

2. Describe your reactions to what you did

The discussion assignment asked about listing two useful cases for decision trees, and I found really useful examples from my classmates, things that I may never think of in my entire life; reading through the discussion was really joyful.

3. Describe any feedback you received or any specific interactions you had. Discuss how they were helpful

Well, I noticed that most of the examples in the discussion assignment were about classification, and I found very little examples about regression, but for me, I added a regression and a classification example.

4. Describe your feelings and attitudes

The idea of decision trees is such an important and widely used tool. As a programmer, I used to use if statements to make decisions, and I sometimes added some charts to visualize some complex decision making paths which resembles the idea of decision trees; but I never though of decision tree as a live object that you can interact with and ask about decisions, so this was super enlightening to me.

5. Describe what you learned

The text (James et al., 2013) discussed the idea of decision trees, and their usefulness in both regression and classification problems; other tools for building decision trees and segmenting into useful regions were also discussed, including bagging, random forests, and boosting.

Ideas of entropy and information gains were also discussed, and how to use them to build decision trees. We also learned about R’s rpart library and how to use it to build decision trees.

6. What surprised me or caused me to wonder?

I thought that building a tree would be super complex task, however, R standard and community libraries made it super easy to build a tree and visualize it.

A compelling reason to use a tree is its readability and interpret-ability, to human readers; thus, it is important to build a visualization of the tree that include all relevant information colored according to the domain of the problem. R libraries like rpart.plot and rattle were super helpful in this regard ( Gorman, 2014).

7. What happened that felt particularly challenging? Why was it challenging to me?

The programming assignment was challenging, especially the last part were I had to print a table that compares the results of our test set with the actual data set and then find the accuracy of the model. I had to do a lot of research and trial and error to be able to do that and finally got the table printed, where it showed that the accuracy of the model is around 85%.

8. What skills and knowledge do I recognize that I am gaining?

The similarities and differences between regression and classification problems are now clearer than before. The idea of entropy and information gain is also clearer now. Along with how to build decision trees and how to visualize them.

Also, the programming assignment gave a practical example of how to separate the original dataset into training and testing sets, and how to use the training set to build the model and then use the testing set to test the model and find its accuracy by running it against the model and compare the results with the original data set ( Awati, 2016).

9. What am I realizing about myself as a learner?

As I expected the concepts of the first weeks are now taking shape within my skill set, although, the concepts of the this week may not be fully understood yet; but as such, the next weeks will build on top of them and will make them clearer.

10. In what ways am I able to apply the ideas and concepts gained to my own experience?

At work, we need to decide which of our case managers is the most suitable for a specific case. We can analyze the historical data and build a decision tree, and when a new case is being created the decision tree is consulted to select the best match.

11. Describe one important thing that you are thinking about in relation to the activity

If I was to understand everything in the text deeply I would have spent a lot of time; so it is okay to not seek perfectionism on the theoretical part of the things as long as the practical part is understood and can be applied.

References