示例#1
0
 def __init__(self,
              alpha=0.9,
              epsilon=0.0,
              s=0.0,
              recursive_depth_bound=10,
              **kwargs):
     self.alpha = alpha
     self.s = s
     self.epsilon = epsilon
     self.recursive_depth_bound = recursive_depth_bound
     self.point_ll = 0
     RecursiveLexicon.__init__(self, alpha=self.alpha, **kwargs)
示例#2
0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except (RecursionDepthException, TooBigException):
         return set()
示例#3
0
 def __init__(self, alpha=0.9, recursive_depth_bound=10, **kwargs):
     self.alpha = alpha
     self.recursive_depth_bound = recursive_depth_bound
     self.point_ll = 0
     RecursiveLexicon.__init__(self, alpha=self.alpha, **kwargs)
示例#4
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLexicon.__init__(self, recurse_bound=5, maxnodes=50, variable_weight=3.0, **kwargs)
     self.grammar=grammar
     self.N = 0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except EvaluationException:
         return set()
示例#6
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLexicon.__init__(self, recurse_bound=5, maxnodes=50, variable_weight=3.0, **kwargs)
     self.grammar=grammar
     self.N = 0
     self.outlier = -100 # read in MultinomialLikelihood
示例#7
0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except EvaluationException:
         return set()
示例#8
0
文件: Model.py 项目: joshrule/LOTlib
 def propose(self):
     while True:
         try:
             return RecursiveLexicon.propose(self)
         except RecursionDepthException:
             pass
示例#9
0
文件: Model.py 项目: joshrule/LOTlib
 def __init__(self, grammar=None, **kwargs):
     RecursiveLexicon.__init__(self, recurse_bound=5, maxnodes=50, variable_weight=3.0, **kwargs)
     self.grammar=grammar
     self.N = 0