Exemplo n.º 1
0
	def prob(cls, point, mean, precision, debug=False, discretization=0.1):
		prob = 1.0

		for key, pt in point.iteritems():
			prob *= abs(gaussian_cdf(pt+discretization, mean[key], precision[key])
						- gaussian_cdf(pt-discretization, mean[key], precision[key]))

		return prob
Exemplo n.º 2
0
    def prob(cls, point, mean, precision, debug=False, discretization=0.1):
        prob = 1.0

        for key, pt in point.iteritems():
            prob *= abs(
                gaussian_cdf(pt + discretization, mean[key], precision[key]) -
                gaussian_cdf(pt - discretization, mean[key], precision[key]))

        return prob
Exemplo n.º 3
0
	def log_prob(cls, point, mean, precision, debug=False, discretization=0.1):
		log_prob = 0.0

		for key, pt in point.iteritems():
			prob = abs(gaussian_cdf(pt+discretization, mean[key], precision[key])
					   - gaussian_cdf(pt-discretization, mean[key], precision[key]))
			log_prob += log(prob) if prob else float("-inf")

		return log_prob
Exemplo n.º 4
0
    def log_prob(cls, point, mean, precision, debug=False, discretization=0.1):
        log_prob = 0.0

        for key, pt in point.iteritems():
            prob = abs(
                gaussian_cdf(pt + discretization, mean[key], precision[key]) -
                gaussian_cdf(pt - discretization, mean[key], precision[key]))
            log_prob += log(prob) if prob else float("-inf")

        return log_prob