from common.Pmf import Pmf


class Cookie(Pmf):
    bowl_1 = {'vanilla': 0.75, 'chocolate': 0.25}
    bowl_2 = {'vanilla': 0.5, 'chocolate': 0.5}
    mixes = {'Bowl 1': bowl_1, 'Bowl 2': bowl_2}

    def likelihood(self, data, hypo):
        mix = self.mixes[hypo]
        return mix[data]

    def update(self, data):
        for hypo in self.values():
            like = self.likelihood(data, hypo)
            self.mult(hypo, like)
        self.normalize()

8d1a1768a5d2f22cf9cdbc45e9ac9ec7a6cf0610
<mask token>


class Cookie(Pmf):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Cookie(Pmf):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def update(self, data):
        for hypo in self.values():
            like = self.likelihood(data, hypo)
            self.mult(hypo, like)
        self.normalize()

<mask token>


class Cookie(Pmf):
    <mask token>
    <mask token>
    <mask token>

    def likelihood(self, data, hypo):
        mix = self.mixes[hypo]
        return mix[data]

    def update(self, data):
        for hypo in self.values():
            like = self.likelihood(data, hypo)
            self.mult(hypo, like)
        self.normalize()

<mask token>


class Cookie(Pmf):
    bowl_1 = {'vanilla': 0.75, 'chocolate': 0.25}
    bowl_2 = {'vanilla': 0.5, 'chocolate': 0.5}
    mixes = {'Bowl 1': bowl_1, 'Bowl 2': bowl_2}

    def likelihood(self, data, hypo):
        mix = self.mixes[hypo]
        return mix[data]

    def update(self, data):
        for hypo in self.values():
            like = self.likelihood(data, hypo)
            self.mult(hypo, like)
        self.normalize()

from common.Pmf import Pmf


class Cookie(Pmf):
    bowl_1 = {'vanilla': 0.75, 'chocolate': 0.25}
    bowl_2 = {'vanilla': 0.5, 'chocolate': 0.5}
    mixes = {'Bowl 1': bowl_1, 'Bowl 2': bowl_2}

    def likelihood(self, data, hypo):
        mix = self.mixes[hypo]
        return mix[data]

    def update(self, data):
        for hypo in self.values():
            like = self.likelihood(data, hypo)
            self.mult(hypo, like)
        self.normalize()
