Beispiel #1
0
 def learn(self, model, inf=None):
     model.regularization = 0.01
     model.inter_node_pos_same_label_default = 0.1
     p = mmln.estimate_p_values_inter_node(self.n)
     for label1 in p:
         for label2 in p[label1]:
             if p[label1][label2] < 0.1:
                 model.inter_node_pos[(label1, label2)] = 2
             elif p[label1][label2] < 0.2:
                 model.inter_node_pos[(label1, label2)] = 1
             elif p[label1][label2] < 0.5:
                 model.inter_node_pos[(label1, label2)] = 0.5
Beispiel #2
0
 def test_estimate_p_values_inter_node(self):
     net = self._get_network()
     p = mmln.estimate_p_values_inter_node(net, 100)
     self.assertEqual(len(p), 2)