Hi Marco

Thanks for your quick response

>-----Original Message-----
>From: Marco Scutari [mailto:marco.scut...@gmail.com] 
>Sent: Monday, 29 February 2016 8:24 PM
>To: ross.chap...@ecogeonomix.com
>Cc: r-help <r-help@r-project.org>
>Subject: Re: [R] bnlearn and TAN network
>
>Hi Ross,
>
>On 29 February 2016 at 08:46,  <ross.chap...@ecogeonomix.com> wrote:
>> The graph shows arcs between each of the variables and the output node
>> (classFFB) along with internal nodes showing parent/child relations 
>> between
>> 4 nodes.
>
>Yes, that is as expected.
>
>> However, when I look at the model in the TAN object and the 
> >conditional probabilities in the fitted object, there is only one 
>> direct arc leading to output node (classFFB) through a variable EST, 
>> all other relations act through that arc.
>
>I am not sure how that could possibly happen, could you share the print outut 
>for a few nodes so that I can get some idea of what it is going on?

When I look at the model in Tan I get this output:

> TAN

  Bayesian network Classifier

  model:
   
[classFFB][matureTreeData.ESTATE|classFFB][matureTreeData.YEAR|classFFB:matureTreeData.ESTATE][matureTreeData.SMG|classFFB:matureTreeData.ESTATE]
   
[classNPKMg3YW_IN|classFFB:matureTreeData.YEAR][classHarvIntensity|classFFB:matureTreeData.YEAR]
  nodes:                                 6 
  arcs:                                  9 
    undirected arcs:                     0 
    directed arcs:                       9 
  average markov blanket size:           3.00 
  average neighbourhood size:            3.00 
  average branching factor:              1.50 

  learning algorithm:                    TAN Bayes Classifier 
  mutual information estimator:          Maximum Likelihood (disc.) 
  training node:                         classFFB 
  tests used in the learning procedure:  10

The output node is classFFB.  My understanding is that the model only has one 
node linked directly to the output node: ][matureTreeData.ESTATE|classFFB].

Have I missed something here?

>
>> Am I correct in interpreting that the all direct nodes except for
>> EST->classFFB which are shown in the graphviz.plot are not retained 
>> EST->once the
>> model is trained. In which case, is there a way of showing the network 
>> after training?

>TAN does not do any sort of feature selection, so all the nodes should be 
>there. As for "showing the network after training", what kind of plot are you 
>looking for?

I was looking for  a plot which shows the learned network, an example of which 
I have attached.



>Cheers,
  >  Marco


______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to