def marginal(self, val, normalizer=1.0):
        '''
        The marginal function in a Variable
        Node is the product of all incoming
        messages. These should all be functions
        of this nodes variable.
        When any of the variables in the
        network are constrained we need to
        normalize.
        '''
        product = 1
        for _, message in self.received_messages.iteritems():
            product *= message(val)
        return product / normalizer
dataset/ETHPy150Open eBay/bayesian-belief-networks/bayesian/factor_graph.py/VariableNode.marginal/original