California Investment Network


Recent Blog


Pitching Help Desk


Testimonials

"We have already had one investor for $25K, and another who is very involved in the food business, who could be a funder on a much larger level. So we are very pleased, and offer our thanks."
Bruce J.

 BLOG >> Recent

Representing Decisions with Graphviz [Decision Trees
Posted on July 29, 2013 @ 04:14:00 AM by Paul Meagher

Previously I discussed a simple risk management framework that involves precisely specifying the actions, events, and outcomes involved in a decision problem.

One aspect of "precisely specifying" a decision is representing the overall decision making problem in the form of a graph. We can use a pad of paper to draw lines representing possible actions, which lead to events, which lead to outcomes. Or, we can use a tool like Graphviz to construct much prettier graphs and make us feel more professional.

GraphViz was developed by AT&T Research and is considered a top-tier tool for creating/visualizing graph structures.

In today's blog, I want to give you a basic idea of how Graphviz works so you can judge for yourself whether you want to invest time into learning it.

To generate a graph using Graphviz you need to write some commands into a "dot" file that ends with the extension ".dot". The term "dot" is also used to denote one of the main Graphviz programs used to generate graphs from dot files. Also, the term "DOT" is used to refer to the command langauge you enter into your dot files.

Without further ado, here is dot file called DecisionTree.dot that depicts a decision in terms of an action, event, outcome framework for managing risk.

digraph DecisionTree {

  Decision -> Action1;
  Decision -> Action2;

  Action1 -> Event1;
  Event1 -> Outcome1;
  Event1 -> Outcome2;

  Action2 -> Event2;
  Event2 -> Outcome3;
  Event2 -> Outcome4;

}

If I run this command from my Linux command prompt:

dot -Tpng DecisionTree.dot > DecisionTree.png

The dot interpreter will read the file and generate the graph in png format. This is what that output looks like.

As you can see, it is not difficult to go from entering commands into a dot file and generating a decent looking graph. The DOT language has much more powerful features for drawing graphs than what I am showing you here; however, in the initial stages of sketching out the actions, events, and outcomes involved in your decision problem, you may want to keep things simple and just focus on drawing out all the nodes and the lines between them.

The graph below visualizes a nitrogren application decision. Do I apply 90 lbs per acre of Nitrogren or 110 lbs? The effect of each action on the crop I want to grow is jointly determined by the amount of rainfall I'm likely to recieve over the growing season. The action forks (i.e., application amounts) lead to the event forks (i.e., rainfall amounts) which lead to the terminal outcomes (i.e., expected number of bushels).

Permalink 

 Archive 
 

Categories


 Agriculture [71]
 Bayesian Inference [14]
 Books [15]
 Business Models [24]
 Causal Inference [2]
 Creativity [7]
 Decision Making [15]
 Decision Trees [8]
 Design [36]
 Eco-Green [3]
 Economics [11]
 Education [10]
 Energy [0]
 Entrepreneurship [57]
 Events [2]
 Farming [20]
 Finance [25]
 Future [15]
 Growth [18]
 Investing [24]
 Lean Startup [10]
 Leisure [5]
 Lens Model [9]
 Making [1]
 Management [9]
 Motivation [3]
 Nature [22]
 Patents & Trademarks [1]
 Permaculture [34]
 Psychology [1]
 Real Estate [2]
 Robots [1]
 Selling [11]
 Site News [13]
 Startups [12]
 Statistics [3]
 Systems Thinking [2]
 Trends [7]
 Useful Links [3]
 Valuation [1]
 Venture Capital [5]
 Video [2]
 Writing [2]