Decision trees in Power BI
This is about decision trees in Power BI.
Let´s use this table, provided by Microsoft - for download click here.
We´d like to see which factors has impact on whether customer buys or doesn´t buy a bike.
Download the Decision tree custom visual.
Load data and put Purchased bike to Target Variable, and some variables to Input Variables. There should be variables with estimated impact on target variable.
The tree is created.
- For example, with our variables we know, that 46% of customers buys a bike.
- But there is big impact of number of car owned - so if the customer owns less than 1,5 cars, then the probability they will buy the bike is bigger - 54%.
- If we only considered these from them with commute distance 5-10 miles, the probability would be 58%.
It´s good to know, that every visual, including decision trees, is filtered by other visuals (typically by slicers). So it is very easy to switch the trees for different sex, education, number of cars etc.