ddsweet(Uns): universal network simulator Support This Project

Gneral description

In graphic_model moduler, the class Pnode is provided. And can be used like this:

from graphic_model import *
x = Pnode()
x.probability('x1',0.4,'x2',-1)
y = Pnode()
y.on(x)
y.probability('y1','x1',0.9,'y1','x2',0.8,'y2',-1)
z = Pnode()
z.on(y)
z.probability('z1','y1',0.7,'z1','y2',0.4,'z2',-1)
w = Pnode()
w.on(z)
w.probability('w1','z1',0.5,'w1','z2',0.6,'w2',-1)
result = y.infer({x:'x1'})
print result
result = z.infer({x:'x1'})
print result
result = w.infer({x:'x1'})
print result


This software is [Python Powered] The subversion, webpage is provided by SourceForge.net Logo