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

Incorrect documentation about arbitrary dimensions #61

Open
alexge233 opened this issue Jan 11, 2024 · 2 comments
Open

Incorrect documentation about arbitrary dimensions #61

alexge233 opened this issue Jan 11, 2024 · 2 comments

Comments

@alexge233
Copy link

Hello,

The documentation seems to suggest that I can pass n-dim arguments to distance_correlation, however as soon as I pass a 41318, 2, 5 tensor, I get errors. Reading #50 seems to suggest that I need to reshape the input. Reshaping by flattening the inner dimensions fixes the assertion errors, but this leads me to believe that the function does not actually implement n-dim arguments.
Row-wise calculations as suggested imply that I need to unroll the dimensions manually to do the calculations?
In which case, IMHO the documentation isn't really accurate of the methods implemented.

Thanks for the library by the way, much appreciated!

@vnmabus
Copy link
Owner

vnmabus commented Jan 26, 2024

Sorry for the terminology. You can only pass 1D or 2D arguments, as you noticed. The first dimension is the number of observations of a random variable/random vector, while the second one is the dimension of the random vector (THIS dimension is what is arbitrary).

I would love to make this functionality more gufunc-like (and thus remove the need for rowwise), but I had not time to do so. I am also a bit hesitant because the most similar functionality in NumPy, np.corrcoef, is NOT a gufunc and in fact has an opposite convention for the dimensions' meaning. If you have feedback regarding this, please feel free to share it.

@alexge233
Copy link
Author

alexge233 commented Jan 29, 2024 via email

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