当前位置: 首页>>代码示例>>Python>>正文


Python LOTHypothesis.__call__方法代码示例

本文整理汇总了Python中LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis.__call__方法的典型用法代码示例。如果您正苦于以下问题:Python LOTHypothesis.__call__方法的具体用法?Python LOTHypothesis.__call__怎么用?Python LOTHypothesis.__call__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis的用法示例。


在下文中一共展示了LOTHypothesis.__call__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
 def __call__(self, *vals):
     """
         Must overwrite call in order to include the constants
     """
     vals = list(vals)
     vals.extend(self.parameters)
     return LOTHypothesis.__call__(self, *vals)
开发者ID:joshrule,项目名称:LOTlib,代码行数:9,代码来源:Model.py

示例2: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
 def __call__(self, *vals):
     """
         Must overwrite call in order to include the constants
     """
     vals = list(vals)
     vals.extend(self.CONSTANT_VALUES)
     return LOTHypothesis.__call__(self, *vals)
开发者ID:ebigelow,项目名称:LOTlib,代码行数:9,代码来源:Hypothesis.py

示例3: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
    def __call__(self, *args, **kwargs):
        # we have to mod this to insert the spaces since they aren't part of cons above
        ret = LOTHypothesis.__call__(self, *args, **kwargs)

        out = dict()
        for k, v in ret.items():
            out[" ".join(k)] = v
        return out
开发者ID:piantado,项目名称:LOTlib,代码行数:10,代码来源:Model.py

示例4: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
    def __call__(self, *args, **kwargs):
        if self.value_set is None:
            value_set = LOTHypothesis.__call__(self)
            # Restrict our concept to being within our domain; also handle 'None' call values
            if isinstance(value_set, set):
                value_set = [x for x in value_set if x <= self.domain]
            else:
                value_set = []
            self.value_set = value_set

        return self.value_set
开发者ID:moverlan,项目名称:LOTlib,代码行数:13,代码来源:Hypothesis.py

示例5: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
    def __call__(self, *args, **kwargs):
        # Sometimes self.value has too many nodes
        try:
            value_set = LOTHypothesis.__call__(self)
        except TooBigException:
            value_set = set()

        if isinstance(value_set, set):
            # Restrict our concept to being within our domain
            value_set = [x for x in value_set if (1 <= x <= self.domain)]
        else:
            # Sometimes self() returns None
            value_set = set()

        return value_set
开发者ID:joshrule,项目名称:LOTlib,代码行数:17,代码来源:Model.py

示例6: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
 def __call__(self, *args):
     try:
         return LOTHypothesis.__call__(self, *args)
     except EvaluationException:
         return None
开发者ID:joshrule,项目名称:LOTlib,代码行数:7,代码来源:Model.py

示例7: __call__

# 需要导入模块: from LOTlib.Hypotheses.LOTHypothesis import LOTHypothesis [as 别名]
# 或者: from LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis import __call__ [as 别名]
 def __call__(self, *args, **kwargs):
     return compute_outcomes(lambda *args: LOTHypothesis.__call__(self, *args, **kwargs), maxcontext=100000)
开发者ID:piantado,项目名称:LOTlib,代码行数:4,代码来源:Model.py


注:本文中的LOTlib.Hypotheses.LOTHypothesis.LOTHypothesis.__call__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。