當前位置: 首頁>>代碼示例>>Python>>正文


Python LOTHypothesis.__init__方法代碼示例

本文整理匯總了Python中LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python LOTHypothesis.__init__方法的具體用法?Python LOTHypothesis.__init__怎麽用?Python LOTHypothesis.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis的用法示例。


在下文中一共展示了LOTHypothesis.__init__方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
    def __init__(self, constant_sd=1.0, fit_only_once=True, **kwargs):
        """
        :param constant_sd: The SD of our constants in the prior
        :param fit_only_once: Do we fit multiple times or just take the first?
        """
        LOTHypothesis.__init__(self, grammar, display='lambda x,'+','.join(CONSTANT_NAMES)+": %s", **kwargs)

        self.constant_sd=constant_sd # also the prior SD
        self.parameters = self.sample_constants()
        self.fit_only_once = fit_only_once
開發者ID:joshrule,項目名稱:LOTlib,代碼行數:12,代碼來源:Model.py

示例2: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, ALPHA=0.9, **kwargs):
     LOTHypothesis.__init__(self, grammar, **kwargs)
     self.ALPHA = ALPHA
開發者ID:ebigelow,項目名稱:LOTlib,代碼行數:5,代碼來源:Hypothesis.py

示例3: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, grammar=None, **kwargs):
     LOTHypothesis.__init__(self, grammar, display="lambda : %s", **kwargs)
     self.outlier = -1000  # for MultinomialLikelihood
開發者ID:piantado,項目名稱:LOTlib,代碼行數:5,代碼來源:Model.py

示例4: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, **kwargs):
     LOTHypothesis.__init__(self, grammar, display="lambda x,y: %s", **kwargs)
開發者ID:joshrule,項目名稱:LOTlib,代碼行數:4,代碼來源:CopyRegenProposal.py

示例5: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, value=None, alpha=0.99, baserate=0.5):
     LOTHypothesis.__init__(self, grammar, value=value, args=['S', 'x'], alpha=alpha, baserate=baserate)
開發者ID:mmolta,項目名稱:LOTlib,代碼行數:4,代碼來源:Hypothesis.py

示例6: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, **kwargs):
     LOTHypothesis.__init__(self, grammar, **kwargs)
開發者ID:wrongu,項目名稱:LOTlib,代碼行數:4,代碼來源:Model.py

示例7: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
    def __init__(self, grammar, value=None, f=None, proposal_function=None, **kwargs):
        LOTHypothesis.__init__(self,grammar,proposal_function=proposal_function, **kwargs)

        if value is None: self.set_value(grammar.generate('WORD'), f)
        else:             self.set_value(value, f)
開發者ID:jthurst3,項目名稱:LOTlib,代碼行數:7,代碼來源:Shared.py

示例8: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, grammar, domain=100, noise=0.9, args=['n'], **kwargs):
     LOTHypothesis.__init__(self, grammar, args=args, **kwargs)
     self.domain = domain
     self.noise = noise
開發者ID:moverlan,項目名稱:LOTlib,代碼行數:6,代碼來源:Specification(old).py

示例9: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, grammar=grammar, **kwargs):
     LOTHypothesis.__init__(self, grammar, display='lambda C : %s', maxnodes=200, **kwargs)
     # self.outlier = -100 # for MultinomialLikelihoodLog
     self.alphabet_size = len(TERMINALS)
開發者ID:piantado,項目名稱:LOTlib,代碼行數:6,代碼來源:Model.py

示例10: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, value=None, alpha=0.99, baserate=0.5):
     LOTHypothesis.__init__(self, grammar, value=value, display='lambda S, x: %s', alpha=alpha, baserate=baserate)
開發者ID:joshrule,項目名稱:LOTlib,代碼行數:4,代碼來源:Hypothesis.py

示例11: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, grammar=grammar, **kwargs):
     LOTHypothesis.__init__(self, grammar=grammar, display="lambda x : %s", maxnodes=150, **kwargs)
開發者ID:piantado,項目名稱:LOTlib,代碼行數:4,代碼來源:makeTestData.py

示例12: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, *args, **kwargs ):
     LOTHypothesis.__init__(self, grammar, display='lambda x,y: %s', **kwargs)
     super(CRHypothesis, self).__init__(*args, **kwargs)
開發者ID:piantado,項目名稱:LOTlib,代碼行數:5,代碼來源:MixtureProposer.py

示例13: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, grammar=None, value=None, domain=100, **kwargs):
     LOTHypothesis.__init__(self, grammar=grammar, value=value, args=[], **kwargs)
     self.domain = domain
開發者ID:joshrule,項目名稱:LOTlib,代碼行數:5,代碼來源:Model.py

示例14: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
 def __init__(self, grammar, alpha=0.9, domain=100, **kwargs):
     LOTHypothesis.__init__(self, grammar, args=[], **kwargs)
     self.alpha = alpha
     self.domain = domain
開發者ID:moverlan,項目名稱:LOTlib,代碼行數:6,代碼來源:Hypothesis.py

示例15: __init__

# 需要導入模塊: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 別名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __init__ [as 別名]
    def __init__(self, value=None, base_facts="", **kwargs):

        self.base_facts = base_facts # must be set before initializer

        LOTHypothesis.__init__(self, grammar, value=value, args=None, **kwargs)
開發者ID:joshrule,項目名稱:LOTlib,代碼行數:7,代碼來源:Model.py


注:本文中的LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。