I am showing participants a scatter plot of x and y and then asking them to guess the correlation. I am trying to model how they arrive at their estimates. For simplicity, our baseline model assumes uncertainty in the perception component only (there is no parameter estimation uncertainty), assuming that observers compute a noisy representation of points’ positions in the two-dimensional scene.
data = (user_estimated_correlation,x,y) where
x,y are the actual data points and
user_estimated_correlation is the participants guess of the correlation, I would like to infer the noise level added by the uncertainty in the perception.
def perception_model(data): user_estimated_correlation,x,y=data noise_in_x = pm.Normal('mu_x', 0,x.max()-x.min(), size=x.shape) noise_in_y = pm.Normal('mu_y', 0,y.max()-y.min(), size=y.shape) @pm.deterministic def add_noise(sigma=sigma,guess=guess): noisy_x = x+noise_in_x noisy_y = y+noise_in return noisy_x,noisy_y noisy_guess=np.corrcoef(add_noise(x,y)) ##how do I do this line? I want to infer the visual noise parameters for the user .. or the actual noisy dataset they observed (i.e., noisy_x, noisy_y) observe(user_estimated_correlation == noisy_guess) return locals()