How to set output order of noisy max

The engine.
Post Reply
Jochen0x90h
Posts: 19
Joined: Thu Jul 11, 2013 1:20 pm

How to set output order of noisy max

Post by Jochen0x90h »

Hi!

I'd like to define nodes with outcome id 0 for false and outcome id 1 for true. When two of these nodes are the parents of a noisy max node, I have to set the parent strengths to [1 0]. The noisy max node has the convenient setNoisyParentStrengths method (java) to do this. But how do I set the strengths for the outcome of the noisy max node? The noisy max node itself should also have outcome id 0 for false and 1 for true.

A related question is how do I use a noisy max node as noisy min? Is there an example somewhere?

Thanks,
Jochen
adam
Posts: 25
Joined: Thu Jan 17, 2008 11:01 pm
Location: Shrivenham, UK
Contact:

Re: How to set output order of noisy max

Post by adam »

Jochen

The short answer is: it's impossible in SMILE to define the 'distinguished' (false) state of the noisy-MAX as the outcome with number 0.

A possible workaround would be to introduce an auxiliary node which would be a child to the noisy-MAX gate and had the reverse states. It would have a deterministic CPT which would be P(child=1|parent_noisy_max=0)=1 and P(child=0|parent_noisy_max=1)=1.

The noisy-MIN would have all inputs and output states negated. The easiest way to achieve this (for the binary case) would be renaming states: it would work in the case when you don't bother with particular assignment of state ids. If you really really care about state ids, OR you have more than two states the trick described above is required.

Negating the parents' states is done with manipulating the parents' strengths.

Cheers,
Adam
Jochen0x90h
Posts: 19
Joined: Thu Jul 11, 2013 1:20 pm

Re: How to set output order of noisy max

Post by Jochen0x90h »

Thanks for your answer. The problem arises when converting a network description to a SMILE network. I will reorder the states, i.e. if the output of a noisy max is fed into another node the cpt of the other node is reordered for the noisy max parent so that it reflects the actual order used by SMILE.

So far I didn't find out why parent strengths are really necessary because the strengths are implicitly defined by the parameters (per-parent cpt's). For example if the state with id 0 is the distinguished state then the corresponding column is [0 1]. The documentation says that the distinguished state has to be the last one in the per-parent cpt's, but it also works when this is not the case and I wonder why it should not work.

So if I would design a Noisy Max I would only have an extra boolean parameter that tells it if first or last state of the output is distinguished and no parent strengths.
adam
Posts: 25
Joined: Thu Jan 17, 2008 11:01 pm
Location: Shrivenham, UK
Contact:

Re: How to set output order of noisy max

Post by adam »

Jochen,

The parent strengths are necessary because the same CPT can be a parent to two different noisy-MAX nodes and those nodes can have different states of the common parent CPT node as distinguished for them. Technically, for the noisy-MAX, only the distinguished state matters, the order of other parent's states is irrelevant.

The solution you suggested would work for binary variables -- for multi-valued variables one would need to provide a solution similar to the parent strengths. I found it redundant -- the parent states serve this purpose.

Best,
Adam
Jochen0x90h
Posts: 19
Joined: Thu Jul 11, 2013 1:20 pm

Re: How to set output order of noisy max

Post by Jochen0x90h »

So is it necessary that the noisy max always sees the distinguished state as last state (highest id)? I would think this is theoretically not necessary, but is it necessary for the implemented algorithms? I can remember that there are special optimizations possible that exploit the noisy max distinguished state.

Why not introduce a noisy min as additional node type? this would be easier than swapping the states around after a noisy max (this is equivalent to the extra boolean parameter: it distinguishes between noisy min and max).

-Jochen
adam
Posts: 25
Joined: Thu Jan 17, 2008 11:01 pm
Location: Shrivenham, UK
Contact:

Re: How to set output order of noisy max

Post by adam »

Jochen,

It's not theoretically necessary, but just a feature. For algorithms, anyway SMILE converts the original network into a different data structures. But please be aware that SMILE does not exploit noisy-MAX for inference -- there are no special algorithms implemented that take advantage of noisy-MAX (or at least exact algorithms).

Actually, there were historically separate gates for noisy-MAX (called noisy-OR) and noisy-MIN (called noisy-AND). They were replaced by a single implementation, the noisy-MAX. Indeed, from usability perspective it is more convenient to have two separate nodes, and now I would do that differently, but at that time it seemed to be a good idea.

Cheers,
Adam
Jochen0x90h
Posts: 19
Joined: Thu Jul 11, 2013 1:20 pm

Re: How to set output order of noisy max

Post by Jochen0x90h »

Hi Adam,

in the properties dialog for noisy max I discovered an outcome order selection which allows none, low to high and high to low. This looks like what I'm searching for, but it does not seem to have an effect, also the possibility to set none is strange as only low to high and high to low make sense.

-Jochen
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: How to set output order of noisy max

Post by shooltz[BayesFusion] »

Jochen0x90h wrote:in the properties dialog for noisy max I discovered an outcome order selection which allows none, low to high and high to low. This looks like what I'm searching for, but it does not seem to have an effect, also the possibility to set none is strange as only low to high and high to low make sense.
The UI element you've found is not related to noisyMAX nodes. The value selected in that combobox is used by the 'strength of influence' algorithm.
Post Reply