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

updated silvermans_rule to work with multidimensional data #166

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bean217
Copy link

@bean217 bean217 commented Mar 14, 2024

silvermans_rule algorithm is essentially the same, but with some handling for multidimensional data thrown in there. Also wrote some tests for checking the shape of the output.

@tommyod
Copy link
Owner

tommyod commented Mar 15, 2024

Do you have a reference for the correctness of taking Silverman's rule in each dimension as you currently do?

In one dimension, the width of a kernel is a single number. In two dimensions it is three numbers: the two diagonals of the covariance matrix and the off diagonal element. If you compute the 1D Silverman estimate along each dimension, then you do not account for correlations between the variables.

Have you thought about this? Have you looked at the literature?

I fear that generalizing Silermans rule to higher dimensions is not as easy as your current code sketch makes it out to be (?).

@bean217
Copy link
Author

bean217 commented Mar 15, 2024

I apologize for my extremely naive implementation. I had made some pretty terrible assumptions, so I'm going to actually read up on this some more rather than continuing to submit something incorrect.

@tommyod
Copy link
Owner

tommyod commented Mar 15, 2024

No worries, have a look at it! If you manage to figure it out it can improve the library.

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

Successfully merging this pull request may close these issues.

None yet

2 participants