def histogram_filter_step(belief, control, measurement): """Bayes filter step implementation: histogram filter.""" # These two lines is the entire filter! prediction = convolve(belief, control) correction = multiply(prediction, measurement) return (prediction, correction)
def histogram_filter_step(belief, control, measurement): """Bayes filter step implementation: histogram filter.""" # These two lines is the entire filter! prediction = convolve(belief, control) correction = multiply(prediction, measurement) # Return both prediction and corrrection. This is for plotting only. # Normally, this would just return the correction. return (prediction, correction)