Create a decision tree

Author: Eugene Taylor
Date Of Creation: 16 August 2021
Update Date: 1 July 2024
Anonim
Let’s Write a Decision Tree Classifier from Scratch - Machine Learning Recipes #8
Video: Let’s Write a Decision Tree Classifier from Scratch - Machine Learning Recipes #8

Content

A decision tree is a graphical flow chart that depicts the process of making a decision or a series of decisions. It is a decision supportive tool that uses a tree-shaped schema, or a model of decisions and their possible consequences. Companies use decision trees to determine company policies or as a resource for employees. Individuals can use decision trees to help make difficult decisions by reducing them to a number of easier or less emotionally charged choices. You can learn how to create a decision tree tailored to your needs by identifying your problem and creating either a default decision tree or a worry decision tree.

To step

Method 1 of 3: Identify your problem

  1. Identify the most important decision you want to make. Before starting your decision tree, find out what the main title for the tree will be, or the problem you want to solve.
    • For example, the most important problem or decision you have to make could be which car to buy.
    • Focus on one problem or decision at the same time to reduce confusion and increase clarity.
  2. Brainstorm. Brainstorming can help you develop ideas. Write down all the variables associated with the decision you want the decision tree to help you make. Write them on a separate sheet of paper, or in the margin of your sheet of paper.
    • For example, if you are creating a decision tree for buying a car, your variables could include price, fashion model, Fuel consumption, style and options.
  3. Put the variables you wrote down in order of priority. Find out what is most important to you and write them down in order (from most important to least important). Depending on the type of decision you make, you can order the variables chronologically by priority, by importance, or both.
    • For a simple means of transport to work, you can set the order of your tree branches for the car decision as follows; price, fuel economy, model, style and options. If you buy the car as a gift for your partner, the priorities can be style, model, options, price and fuel consumption.
    • One way to understand this is to graphically represent the larger decision versus the components required to make the decision. You can put the bigger problem in the middle (organizational problems that affect the quality of the work) and the components of the problem extend from the middle. So, buying the car is the big problem, while price and model are factors that influence the final decision.

Method 2 of 3: Create a default decision tree

  1. Draw a circle. Start your decision tree by drawing a circle, or a square if you prefer, on 1 side of your paper. Give it a name that identifies the most important variable in your decision tree.
    • When you buy a vehicle for work, you can put a circle on the left side of your paper and the price to mention.
  2. Draw lines. Make at least two, but preferably no more than four lines drawn from the first variable. Give each line a name to identify a possibility or series of possibilities that arise from that variable.
    • From you price circle you can draw three arrows with the texts under € 10,000, € 10,000 to € 20,000 and above € 20,000.
  3. Draw circles or squares at the end of each line. These represent the next priority on your list of variables. Draw lines radiating from these circles representing the next set of options. In many cases, the specific options for each square will be different based on the parameters chosen in your initial decision.
    • In this example, any square will be Fuel consumption contain. Because less expensive cars often have a higher fuel consumption, your 2 to 4 choices from each fuel consumption circle will indicate a different range.
  4. Keep adding squares and lines. Keep adding to your flowchart until you reach the end of your decision matrix.
    • It is normal to come up with additional variables while creating your decision tree. In some cases this will only be the case with 1 branch of your tree. In other cases this will be the case with all branches.

Method 3 of 3: Create a worry decision tree

  1. Understand the worry decision tree. The worry tree helps you to: recognize what kind of concerns you have, turn concerns into problems that can be resolved, and determine when it is safe to "let go" of concerns. There are two kinds of things that are not worth worrying about; things you can do something about and things you cannot do something about.
    • Use the worry tree chart to identify one of your concerns. If it is a concern that cannot be helped, then you will know that it is safe to stop worrying. You can distract yourself if you find it difficult to do this.
    • If it's a concern that you can do something about, you can Solving a problem. You won't have to worry about it anymore because you will have a plan.
    • When the concern returns, you can tell yourself that you have a solution and don't have to worry.
  2. Find out what you're worried about. In order to solve your problem, you must first be clear about the problem.
    • Answer the question “What are you worried about?”. Write the answer at the top of your sheet of paper. This will become the main header of your decision tree.
    • You can use the information you gathered in the discovering your problem section.
    • For example, your main problem could be failing your math test and worrying about it.
  3. Analyze whether you can do something about it. The first step to stop worrying is to figure out what you can do to fix it.
    • Draw a line from the main title of your decision tree and name it “can I do something about this”.
    • Then draw two lines from that title, one that says Yes and one that says No.
    • If the answer is NO, circle it. It's safe to stop worrying.
    • If the answer is YES, list what you can do or how you can find out what you can do (on a separate piece of paper).
  4. Ask yourself what you can do right now. Sometimes we are able to fix the problem right away, while other times it can take longer.
    • Draw a line from your last answer (Yes or No). Write “is there anything I can do right now?”.
    • Draw two more lines from this heading and add Yes and No.
    • If the answer is NO, circle it. Then solve the problem and make a plan for the future (on another piece of paper). Then decide when you will implement the plan. After that, it's safe to stop worrying and you can distract yourself.
    • If the answer is YES, circle it. Then fix the problem, make a plan and DO IT. After that, it's safe to stop worrying and distract yourself.

Tips

  • You can color code your decision tree if it helps you with your personal process.
  • A large sheet of presentation paper or drawing paper is often better than a standard size letter paper.

Necessities

  • Pencil or pens
  • Paper