I am new to Bayesian statistics and pymc3. In my problem there is workers and reviewers. workers are given a set of questions.Responses given by workers are reviewed by the reviewers. So review is the observable variable. Based on those observes I need to calculate the quality of response, ability of worker and bias of reviewer. reviews are binary correct(Boolean 1) and incorrect(Boolean 0) I created following model using pymc3 and used find_map function to calculate the wanted variables..
##function
def predict(ob):
with pm3.Model() as last:
quality_precision = pm3.Gamma('quality_precision', 2, 1)
ability = pm3.Normal(name="ability", mu=0, sd=10)
quality = pm3.Normal(name='quality', mu=ability, sd=1 / np.sqrt(quality_precision))
reviewer_bias= pm3.Normal(name="reviewer_bias", mu=0, sd=5)
iscorrect = pm3.Binomial('iscorrect',n=1, p=sigmoid(quality + reviewer_bias), observed=ob)
start = pm3.find_MAP()
return start
##function call
print(predict([0,1,1,1,1]))
When I give observations for a particular response it is calculating the quality of that response, workers ability. It also gives a values for reviewer bias. But if the observations are like [0,1,1,1,1] that is from several reviewers. How can I calculate each reviewers bias separately?.
Again if I have observations of 2 responses. how can I proceed? how to get quality for those responses separately? I can give an observation set a time.. But ability will be calculated only for that response's observations. But ability needed to be calculated for the all reviews given to that persons responses. Help me!