The next type of tree that I want to highlight is Decision Trees. Decision trees are very interesting, why? Well, the idea of a decision tree is to depict decisions that are made at every branch of each node. Let me give you an example, a practical example to make this clear. Here is a very nice visualization that has been developed by Mike Bostock for New York Times. Back then at the time of elections between when where Obama against Romney. And the idea before having the results of the elections back then was to calculate the probabilities of winning of one or the other candidate according to whether one or another state was won by one of the two candidates. So this exactly what you see in this visualization. At every single level of this tree, you see one specific decision branch, right? Decision point, so every single row represents one state, and at the level of each state, you see what happens when the decision branches out into different outcomes. What is really interesting in these visualization is that you can see two important things. One is, what is the chance that a given combination of decisions happens? This is represented by the width of the lines and you can also see what is the final outcome at the end of this branch, which is exactly the two colored icons that you see here. So it's a very, very expressive kind of visualization and useful to represent a lot of interesting properties in the data. In particular, I think it is important for you to know that decision trees can be build automatically out data if the data is labelled with some outcomes. Similarly to what we have seen with the previous examples of dendrograms that can be built automatically as long as you have similarity function defined between the objects. Here we can say that it is possible to build a decision tree automatically out of data if the data is labeled. Let me show you an example to make this more concrete. Here we have a data set that represents passengers in the Titanic, and we have information on whether a person survived or did not survive. So originally we have a little bit over 1200 people who were in the Titanic. And for each person we know whether this person survived or did not. And that's exactly the label, the label is survived, not survived. So what a decision tree algorithm can do is to basically figure out how to organize the data in a way that can be the rules that point towards the final outcome. So for instance here you see that there are two main branches, and these two main branches represent whether one passenger is male or female. Some other branches may be related to socioeconomic status, another branch can be related to age and so on. And once again, here you can see that the line, the width of the line is used to represent something and the color of the lines and the notice is used to represent something. In this specific example, the width is just to see how many passengers follow that specific path. And the color represents what is the percentage of survivors. So the bluer the node in the branch, the more survivors you have there and he redder, the least survivors you have there. So that's another very expressive kind of visualization. And as well as the dendogram tightly coupled to a very specific kind of algorithm that you can use to be the structure out of a given data set.