Decision Tree algorithm

Hi there, I am trying to create a decision tree algorithm in bubble to personalise each user’s end recommendation, with one question on one individual page, to store those answers. Some questions will have multiple decision branches. How do I structure my data and build this? Apologies if this has been addressed before - happy to be directed to tutorial links as I can’t find them

Hey,
Are the amount of decisions finite?
For instance if you know that there can only be a maximum of 3 decisions and each answer can have only 1 decision, then it’s pretty straightforward to build the database. Let me know if I’m right, then I’ll show you how to structure the database

1 Like

Hi, the amount of decisions is finite yes, but each decision is answer dependent, and the answers are not always binary. Some questions have up to 10 possible answers, some have three. The working logic of the questions, the order of the questions will remain the same. I would be grateful for your help.

Ok.

  1. Create an option set for all your decisions
  2. Create an answer data type and add a field called decision, this field should point to the option set decision as it’s type. Also add a field that points to the question that this answer belongs to.(step 3)
  3. Create a question data type: add a filed (list) that will contain all the answers to this question.

Front end

When an answer is selected, run a workflow that shows or does what the answer’s decisions is suppose to do.

Obviously this is just an overview. If you need more help DM me and we can schedule a call and I’ll show you how to do it.

1 Like

This has helped immensely! I am still stuck at the decision end and trying to pull that data to generate the right recommendation. I would love to have a quick chat if you have some time! Not sure I can DM as new user

Ok. Glad it’s helping. fuhclifffuhche@gmail.com
Reach me via email or through my portfolio: Cliff Fuhche | No-code developer