0 Replies Latest reply on Aug 1, 2019 1:45 PM by Amit Das

    Need help with implementing a decision tree or Random forest

    Amit Das

      Hello Community,


      I am trying to explore the possibility of integrating Tableau with R and implementing a decision tree (to begin with, would like to extend it to a random forest later).

      I have attached my worksheet. I give a small description of what I want to achieve here.


      For all customers labelled as 'Frequent', I have the number of transactions they made in last 13 weeks and their average spending per transaction. I calculated the average transactions per customer to be around 4 transactions in this time period. Now I want to make a decision tree that for all 'Frequent' customers, split them in one branch if they have more than the average transactions (4) and if not then into another branch. How to do this? Can someone help me with a script to begin with?


      Many thanks in advance!