Hi,
I am trying to model a logistic cpd with the GeNIe. As it does not offer such a built in mechanism, I obtained the weights from another source. My problem is now how to build this cpd using the building blocks GeNIe offers. I was planning to use the equation node for the softmax, and "abuse" a chance node for the values of the discrete parent. My problem is with the weights: as they vary from record to record (they partly depend on some other features of the record, which are unique to each record individually) , I can not preconfigure them in the equation as constants. Hence I thought of doing some workaround and do something similar to the chance nodeadd "node" for the weight, and have the equation node refer to both the "chance" node and the "weight" node as variables in the equation. However from what is currently offered in the software I dont see any option for an observed node to be continuous.
I was wondering  do you have such an option of an observed continuous node? if not  what would you consider as the best way to achieve the type of cpd I want to model?
Thanks!
"observed" continuous node, modelling logistic cpd

 Site Admin
 Posts: 270
 Joined: Tue Dec 11, 2007 4:24 pm
Re: "observed" continuous node, modelling logistic cpd
You are right in that GeNIe does not have logistic regression built in and you have to learn the regression function outside of GeNIe. Once you have learned it, you can best represent it by the formula with inputs from other variables in your model. These variables can be both your inputs and parameters. When the parameters change for each record, you can best do it all from your own program that accesses SMILE. Then you can change the values of the parameters and inputs for each record within your program. You could do it in GeNIe as well but then you will have to set the values manually, which may be laborious. I hope this helps.
Marek
Marek
Re: "observed" continuous node, modelling logistic cpd
Hi
Thanks, but I am not sure I understand: how can I represent my weights using nodes (which is what I offered  a weight corresponds to a node) if there is no option for a node that can be both observed and take a continuous value? (or maybe there is?)
Thanks!
Thanks, but I am not sure I understand: how can I represent my weights using nodes (which is what I offered  a weight corresponds to a node) if there is no option for a node that can be both observed and take a continuous value? (or maybe there is?)
Thanks!
Re: "observed" continuous node, modelling logistic cpd
Let me rephrase: are there any observed and continuous nodes in GeNIe that can integrate with chance nodes in the sense that they can have choice nodes as descendents?
For example, the equation node can be cont. and observed but it can not have a chance node as child.
(Almost all my network is built from chance nodes so I have to have a way to "connect", at some level, the cont. node with a chance node as a parentchild relationship. I only need the cont. nodes as observable to rep. weights and perhaps some real valued "counter" nodes).
Another question  I have a cpd which can be modeled, conceptually, as several iffs, one inside another:
P( attribute  noise, counter_1,..,counter_n)=
if noise>0.5: cpd=priors for attribute
else(noise<=0.5): if counter1>..... attribute=...
else if counter2>...attribute=...
..... etc
The thing is that if noise>0.5, the outcome for attribute (hence this part of the cpd) will be the same for every value of each of the counters, so defining a complete cpd is a total waste.
It reminds very much of a treecpd where the first "if" is the first level of the tree, second "if" is the second (but only on one side) etc. Does GeNIe have something like a tree cpd? I was hoping to achieve this either by using equation nodes or by "abusing" the decision node for the noise node but again, they can not "connect" with choice nodes. Any suggestions on how I can best model something like that via GeNIe?
Thanks a lot!
For example, the equation node can be cont. and observed but it can not have a chance node as child.
(Almost all my network is built from chance nodes so I have to have a way to "connect", at some level, the cont. node with a chance node as a parentchild relationship. I only need the cont. nodes as observable to rep. weights and perhaps some real valued "counter" nodes).
Another question  I have a cpd which can be modeled, conceptually, as several iffs, one inside another:
P( attribute  noise, counter_1,..,counter_n)=
if noise>0.5: cpd=priors for attribute
else(noise<=0.5): if counter1>..... attribute=...
else if counter2>...attribute=...
..... etc
The thing is that if noise>0.5, the outcome for attribute (hence this part of the cpd) will be the same for every value of each of the counters, so defining a complete cpd is a total waste.
It reminds very much of a treecpd where the first "if" is the first level of the tree, second "if" is the second (but only on one side) etc. Does GeNIe have something like a tree cpd? I was hoping to achieve this either by using equation nodes or by "abusing" the decision node for the noise node but again, they can not "connect" with choice nodes. Any suggestions on how I can best model something like that via GeNIe?
Thanks a lot!

 Site Admin
 Posts: 270
 Joined: Tue Dec 11, 2007 4:24 pm
Re: "observed" continuous node, modelling logistic cpd
Continuous and discrete chance nodes can interact with one another since we released hybrid modeling capability in 2017. Should you have an older version of GeNIe, please upgrade it as soon as possible.
There is no problem with having continuous nodes that are observable/observed and they can be both parents and children of discrete nodes. You can use continuous/equation nodes to represent parameters and weights. The easiest way to implement what you want will be to change their definitions to the values that you want. If you insist on using evidence, then you will have to define them flexibly so that evidence makes sense. For example, you might want to define them as a uniform probability distribution in a certain range and then through observation set a value in that range. Does this make sense?
We have not yet fully integrated hybrid networks with influence diagrams, so having decision and utility nodes in hybrid networks will generally not work yet. Please do stay tuned for this functionality  it is on our development list.
What you describe in the last paragraph will be best done with equations nodes, which allow conditional functions (If, Switch, etc.). My advise is that you try to think in terms of variables and their values and not variables and probabilities of other variables. Bayesian networks are not about probabilities but about values. When we don't know values of variables, we express them by probability distributions. Please note that even a simple CPT shows just a relation between states of parents and states of the child. Because we don't know the functional form of this relation, we express it by means of conditional probability distributions.
Does this help?
Marek
There is no problem with having continuous nodes that are observable/observed and they can be both parents and children of discrete nodes. You can use continuous/equation nodes to represent parameters and weights. The easiest way to implement what you want will be to change their definitions to the values that you want. If you insist on using evidence, then you will have to define them flexibly so that evidence makes sense. For example, you might want to define them as a uniform probability distribution in a certain range and then through observation set a value in that range. Does this make sense?
We have not yet fully integrated hybrid networks with influence diagrams, so having decision and utility nodes in hybrid networks will generally not work yet. Please do stay tuned for this functionality  it is on our development list.
What you describe in the last paragraph will be best done with equations nodes, which allow conditional functions (If, Switch, etc.). My advise is that you try to think in terms of variables and their values and not variables and probabilities of other variables. Bayesian networks are not about probabilities but about values. When we don't know values of variables, we express them by probability distributions. Please note that even a simple CPT shows just a relation between states of parents and states of the child. Because we don't know the functional form of this relation, we express it by means of conditional probability distributions.
Does this help?
Marek