Slide 22
Slide 22 text
A quick visual intro to decision trees
in_sf beds bath price
year_
built
sqft
price_per
_sqft
eleva
tion
1 1 1 865,000 1,993 960 901 17
1 4 2.5 995,000 1,915 2,180 456 62
0 0 1 319,000 1,941 500 638 10
0 1 1 1,135,000 2,005 715 1,587 10
0 2 1 545,000 1,939 1,049 520 39
1 2 1.3 1,097,000 1,904 1,493 735 14
in_sf beds bath price
year_
built
sqft
price_per
_sqft
eleva
tion
1 1 1 865,000 1,993 960 901 17
0 0 1 319,000 1,941 500 638 10
0 1 1 1,135,000 2,005 715 1,587 10
1 2 1.3 1,097,000 1,904 1,493 735 14
0 0.5 1 384,900 1,962 540 713 10
0 5 5 27,500,000 1,930 7,500 3,667 21
in_sf beds bath price
year_
built
sqft
price_per
_sqft
eleva
tion
1 4 2.5 995,000 1,915 2,180 456 62
0 2 1 545,000 1,939 1,049 520 39
1 3 2 1,650,000 1,922 2,025 815 106
1 1 1 699,000 1,907 932 750 59
1 3 2 1,195,000 1,907 1,396 856 33
1 4 3 1,895,000 2,001 2,041 928 61
elevation > 30.5
>
≤
True
False
492 cases
300 cases 192 cases
Variable selection
Select a single variable
Binary partitioning
Split the data into two groups
Split all cases (492) into two groups (300 and 192 cases)!