-
Notifications
You must be signed in to change notification settings - Fork 84
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
How to derive the closed form for M, S, and C in squash_sin(m, s, max_action=None) #12
Comments
Never mind. I figured it out. Thanks. |
Hi @thaipduong, could you give me some hints on it? I am also trying to figure this out while have no clues yet. |
Consider two gaussians X_i and X_j and their sines Y_i = sin X_i and Y_j = sin X_j. You want to compute the covariance E[(Y_i - EY_i) (Y_j - EY_j]. After expanding the product and simplifying a bit, one of the terms is E[Y_i Y_j]. This is the product of two sines so you can use the formula expressing it as a a difference of cosines. Use linearity and after some arithmetic you have entry ij in the covariance matrix, already looking similar to the code. The final part is to vectorise that. For this note what the convention in Tensorflow or numpy is when a column vector is added to a row vector and you are almost done. Hope that helps! |
@hjzh4 , I found my notes on this here: https://drive.google.com/file/d/1MqZMkRM6vkLJIOOhe8gXFddpMflLJvB2/view?usp=sharing |
@thaipduong @mdbenito , thanks a lot guys! I just figured it out! |
Hi guys,
I'm trying to analytically derive the closed forms for M, S and C used in squash_sin function. Deisenroth's thesis only points to some integrations in Appendix A.1 but I don't how he came up with the form used in the code.
Do you happen to know how to derive the forms? Any pointers would be much appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: