예제 #1
0
 def __init__(self,
              n_states=None,
              n_features=None,
              inference_method=None,
              class_weight=None,
              directed=True):
     ChainCRF.__init__(self, n_states, n_features, inference_method,
                       class_weight, directed)
예제 #2
0
 def __init__(self, n_states=2, n_features=None, inference_method='qpbo'):
     ChainCRF.__init__(self, n_states, n_features,
                       inference_method=inference_method)
     self.n_edge_types = 4
     self.size_psi = (n_states * self.n_features
                      + self.n_edge_types * n_states ** 2)