Exemple #1
0
 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):
     """Initialize the distribution.
     hypos: sequence of hypotheses
     """
     Pmf.__init__(self)
     for hypo in hypos:
         self.Set(hypo, 1)
     self.Normalize()
Exemple #4
0
    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()
Exemple #5
0
    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()
Exemple #6
0
    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()
Exemple #7
0
    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()
Exemple #8
0
    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()
Exemple #9
0
    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()
Exemple #11
0
 def __init__(self, hypos):
     Pmf.__init__(self)
     for hypo_k, hypo_v in hypos.items():
         self.Set(hypo_k, 1)
     self.Normalize()
Exemple #12
0
    def __init__(self,hypos):
        Pmf.__init__(self)

        for hypo in hypos:
            self.Set(hypo,1)
Exemple #13
0
 def __init__(self, hypos):
     Pmf.__init__(self)
     for hypo in hypos:
         self.Set(hypo, 1)
     self.Normalize()
 def __init__(self, hypos):
     Pmf.__init__(self)
     for hypo in hypos:
         self.Set(hypo, 1)
     self.Normalize()
Exemple #15
0
 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()
Exemple #17
0
 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()
Exemple #19
0
    def __init__(self, hypos):
        Pmf.__init__(self)

        for who, prob in hypos.iteritems():
            self.Set(who, prob)
        self.Normalize()
Exemple #20
0
 def __init__(self, hypo, alpha=1.0):
     Pmf.__init__(self)
     for hypo in hypos:
         self.Set(hypo, hypo**(-alpha))
     self.Normalize()