Skip to content

updated silvermans_rule to work with multidimensional data#166

Open
bean217 wants to merge 2 commits into
tommyod:masterfrom
bean217:master
Open

updated silvermans_rule to work with multidimensional data#166
bean217 wants to merge 2 commits into
tommyod:masterfrom
bean217:master

Conversation

@bean217

@bean217 bean217 commented Mar 14, 2024

Copy link
Copy Markdown

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

tommyod commented Mar 15, 2024

Copy link
Copy Markdown
Owner

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

bean217 commented Mar 15, 2024

Copy link
Copy Markdown
Author

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

tommyod commented Mar 15, 2024

Copy link
Copy Markdown
Owner

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.

2 participants