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

Missing \delta^2 in C = max_action * tf.diag( tf.exp(-tf.diag_part(s)/2) * tf.cos(m)) #15

Closed
hejia-zhang opened this issue Nov 22, 2018 · 2 comments

Comments

@hejia-zhang
Copy link

hejia-zhang commented Nov 22, 2018

It seems C_ii = max_action_i * (E[X_i]*sin(X_i)] - E[X_i]*E[sin(X_i))])
E[X_i*sin(X_i)] = exp(-var(X_i) / 2)(var(X_i) * cos(mean(X_i)) + mean(X_i)sin(mean(X_i)))
However, there is no var(X_i) in the formula for C in the code

I think it should be C = max_action * tf.diag(tf.exp(-tf.diag_part(s) / 2) * tf.diag_part(s) * tf.cos(m))

@nrontsis
Copy link
Owner

Thanks for opening the issue but I am having trouble understanding your math. Also, the code in squash_sin has been tested against the MATLAB implementation gSin.m (see this test). So if you are correct, either the unit test is erroneous or both implementations are wrong.

Please write the math more clearly and open a PR if you still think there is a mistake. In doing so you might find helpful Deisenroth's thesis page 42 and Appendix A1 and this paper, section 5.2.

@nrontsis
Copy link
Owner

Closing due to inactivity.

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