Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem about parameter estimation of Au #5

Open
idle-tmac opened this issue Jun 4, 2018 · 1 comment
Open

problem about parameter estimation of Au #5

idle-tmac opened this issue Jun 4, 2018 · 1 comment

Comments

@idle-tmac
Copy link

idle-tmac commented Jun 4, 2018

def _getSessionEstimate(self, positionRelevances, layout, clicks, intent):
....
gamma = self.getGamma(self.gammas, k, layout, intent)
# E_k_multiplier --- P(S_k = 0 | C_k) P(C_k | E_k = 1)
if C_k == 0:
sessionEstimate['a'][k] = a_u * varphi[k][0]
sessionEstimate['s'][k] = 0.0
else:
sessionEstimate['a'][k] = 1.0
sessionEstimate['s'][k] = varphi[k + 1][0] * s_u / (s_u + (1 - gamma) * (1 - s_u))
....

In the above function, sessionEstimate['a'][k] = a_u * varphi[k][0] mybe wrong,it should be a_u * varphi[k][1]?

reason:a_u = P(C_k = 1 | E_k = 1 )
varphi[k][1] = P( E_k = 1 |C_1, C_2, C_3,.....C_N )

so:
sessionEstimate['a'][k] = P(C_k = 1 | C_1, C_2, C_3,.....C_N) = P(C_k = 1 | E_k = 1 ) * P( E_k = 1 |C_1, C_2, C_3,.....C_N ) = a_u * varphi[k][1]

Do you agree with my opinion ? Please help me solve it,thank you.

@idle-tmac idle-tmac changed the title au 参数估计问题 problem about parameter estimationg of Au Jun 4, 2018
@idle-tmac idle-tmac changed the title problem about parameter estimationg of Au problem about parameter estimation of Au Jun 4, 2018
@varepsilon
Copy link
Owner

Thanks for your report. I've updated the comment in the function to hopefully make it clearer. Basically, in this part of the code branch C_k = 0, so

sessionEstimate['a'][k] = P(A_k = 1 | C_1, C_2, ..., C_N) = P(A_k = 1 | C_k = 0) =
    P(A_k = 1, C_k = 0) / P(C_k = 0) = P(A_k = 1, C_k = 0) = P(A_k = 1) * P(C_k = 0 | A_k = 1) =
    a_u * varphi[k][0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants