def __init__(self, hypos): """Initialize the distribution. hypos: sequence of hypotheses """ Pmf.__init__(self) for hypo in hypos: self.Set(hypo, 1) self.Normalize()
def __init__(self, hypos): """Initialize self. hypos: sequence of string bowl IDs """ Pmf.__init__(self) for hypo in hypos: self.Set(hypo, 1) self.Normalize()
def __init__(self, hypos, alpha=1.0): """Initializes the hypotheses with a power law distribution. hypos: sequence of hypotheses """ Pmf.__init__(self) for hypo in hypos: self.Set(hypo, hypo**(-alpha)) self.Normalize()
def __init__(self, hypos): """Initialize self. hypos: whether you play tennis or not """ Pmf.__init__(self) for hypo in hypos: self.Set(hypo, countdict[hypo]) self.Normalize()
def __init__(self, hypos): """UPDATE THIS DOCSTRING hypos: sequence of hypotheses representing possible company sizes """ Pmf.__init__(self) for hypo in hypos: self.Set(hypo, int(max(hypos) / hypo) * hypo) self.Normalize()
def __init__(self, hypos, alpha=1.0): """Initializes hypotheses with a power law distribution. hypos: sequence of hypotheses alpha: parameter of the power law prior """ Pmf.__init__(self) for hypo in hypos: self.Set(hypo, hypo**(-alpha)) self.Normalize()
def __init__(self, sides): Pmf.__init__(self) for side in xrange(1, sides + 1): self.Set(side, 1) self.Normalize()
def __init__(self, hypos): Pmf.__init__(self) for hypo_k, hypo_v in hypos.items(): self.Set(hypo_k, 1) self.Normalize()
def __init__(self,hypos): Pmf.__init__(self) for hypo in hypos: self.Set(hypo,1)
def __init__(self, hypos): Pmf.__init__(self) for hypo in hypos: self.Set(hypo, 1) self.Normalize()
def __init__(self, hypos, alpha = 1.0): Pmf.__init__(self) for hypo in hypos: self.Set(hypo, hypo**(-alpha)) self.Normalize()
def __init__(self, bowls): Pmf.__init__(self) self.bowls = bowls for hypo in bowls.keys(): self.Set(hypo, 1) self.Normalize()
def __init__(self): Pmf.__init__(self) self.Set('goodsinger', 0.05) self.Set('badsinger', 0.95) self.Normalize()
def __init__(self, sides): Pmf.__init__(self) for x in xrange(1, sides+1): self.Set(x, 1) self.Normalize()
def __init__(self, hypos): Pmf.__init__(self) for who, prob in hypos.iteritems(): self.Set(who, prob) self.Normalize()
def __init__(self, hypo, alpha=1.0): Pmf.__init__(self) for hypo in hypos: self.Set(hypo, hypo**(-alpha)) self.Normalize()