[R] Simple tree

Petr Savicky savicky at cs.cas.cz
Thu Jul 19 09:09:41 CEST 2012


On Wed, Jul 18, 2012 at 06:34:49PM -0700, Noah Silverman wrote:
> Hi,
> 
> I'm looking for an "easy" way to setup a decision tree.
> 
> This is *not* any kind of regression, but a very simple DAG with probability on each edge and a value at each node.  I just need a way to input the graph and calculate the expected value at each end node.  The whole thing could be done with a calculator and pencil, but it would be nice to have everything in R.

Hi.

Is the graph a tree or a general DAG?

If i understand correctly, there is a single input node, where the
process starts and in each non-end node, the process continues at a
randomly chosen out-going edge with the specified probabilities.
What is the output, if the process goes through a sequence of nodes,
which are assigned the values w_0, ..., w_n? Here, w_0 is the value
of the start node and w_n the value of an end-node.

Petr Savicky.



More information about the R-help mailing list