Skip to content
Snippets Groups Projects
Commit 07ca2cc2 authored by Lukas Kettenbach's avatar Lukas Kettenbach
Browse files

Some structure changes in reasoning

parent 3d73f8c7
No related branches found
No related tags found
No related merge requests found
*.pyc
*~
*.nja
......@@ -3,16 +3,15 @@ sys.path.append("../lib/networkx-1.7-py2.7.egg")
import networkx as nx
import Node.Node
class BayesNet(object):
graph = nx.DiGraph()
def __init__(self):
print "lol"
def add_node(self, node):
if isinstance(node, Node.Node):
self.graph.add_node(node)
else:
raise Exception("Can only add 'Node' and its subclasses as nodes into the BayesNet")
raise Exception("Can only add 'Node' and its subclasses as nodes into the BayesNet")
\ No newline at end of file
# -*- coding: utf-8 -*-
from core.Node import Node
class DecisionNode(Node):
'''TODO: write doc'''
def __init__(self):
super(DecisionNode, self).__init__()
\ No newline at end of file
# -*- coding: utf-8 -*-
from core.Node import Node
class UtilityNode(Node):
'''TODO: write doc'''
def __init__(self):
super(UtilityNode, self).__init__()
\ No newline at end of file
# -*- coding: utf-8 -*-
class AbstractCPD(object):
'''TODO: write doc'''
def __init__(self):
super(AbstractCPD, self).__init__()
\ No newline at end of file
# -*- coding: utf-8 -*-
from reasoning.AbstractCPD import AbstractCPD
class CPT(AbstractCPD):
'''TODO: write doc'''
def __init__(self):
super(CPT, self).__init__()
# -*- coding: utf-8 -*-
from reasoning.AbstractCPD import AbstractCPD
class Gauss(AbstractCPD):
'''TODO: write doc'''
def __init__(self):
super(Gauss, self).__init__()
# -*- coding: utf-8 -*-
from core.Node import Node
from reasoning.AbstractCPD import AbstractCPD
class RandomNode(Node):
'''TODO: write doc'''
cpd = AbstractCPD()
def __init__(self):
super(RandomNode, self).__init__()
\ No newline at end of file
from AbstractCPD import AbstractCPD
from CPT import CPT
from Gauss import Gauss
from RandomNode import RandomNode
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment